Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error??

Status
Not open for further replies.

DirtyB

Programmer
Mar 13, 2001
159
US
Can anyone tell me what this error means?

"Reserved Error (-3022); There is no message for this error"

Microsoft knowledgebase has 0 articles. I am not doing any connecting to other databases or anything, it's merely an insert query, from one table in my database to another, the syntax seems ok.


Anyone have any ideas...this is frustrating.
 
Hi!

If you could post the SQL that would be helpful. The only thought that occurs to me without seeing the code, have you named any fields or tables using Access reserved words?

hth
Jeff Bridgham
bridgham@purdue.edu
 
here ya go! thanks for your help...

INSERT INTO EXCEPTIONALITIES
(StudentID, Disability, Expr1, ExitDate, FTE, ProviderSSN, ProviderNBr, ExitCode, [Primary], SchoolYear )
SELECT
[specialeducationdata].[StudentID],
[specialeducationdata].[SecDis] AS Disability,
"01011900" AS Expr1,
[specialeducationdata].[ExitDate],
"1.0" AS FTE,
[specialeducationprovider].[ProviderSSN],
[specialeducationprovider].[providernbr],
[specialeducationdata].[ExitCode],
"2" AS [Primary],
[specialeducationdata].[SchoolYear]
INTO EXCEPTIONALITIES
FROM specialeducationdata
LEFT JOIN specialeducationprovider
ON [specialeducationdata].[StudentID]=[specialeducationprovider].[StudentID]
WHERE [specialeducationdata].[SecDis] Is Not Null
And ([specialeducationprovider].[ProviderNbr]=2 Or [specialeducationprovider].[providernbr] Is Null)
And [specialeducationdata].[SchoolYear]=2002
And ([specialeducationprovider].[schoolyear]=2002 Or [specialeducationprovider].[SchoolYear] Is Null);
 
Hi!

I've never tried to do it this way. I usually build the query I need to get the information out and use that in my Select statement. I have never used a second Into statement either and maybe that is all you need to remove. To simplify the append query, I would encourage you to make a select query that pulls the information from your two tables and base the append query on that.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Have you checked for duplicate primary keys on the insert. The error 3022 is duplicate keys and maybe the - can be ignored. Try just doing one record with your sql statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top