August 17, 2004 at 11:07 am
Hello,
I have a DTS package in SQL Server 2000 Standard in which in the last step, an insert takes place from a SQL Server 2000 table called 'tblMMStateStandardsTEMP' to another SQL Server 2000 table called 'tblMMStateStandards'. There is a left join between the two tables on a primary key field (both tables) called 'stanID'. Data goes into 'tblMMStateStandards' where 'stanID' in 'tblMMStateStandards' is null.
The query looks like this:
Insert tblMMStateStandards
(Grade, Domain, StanNum, SGroup, Strand, StanDesc, SubStrand,
IDContentArea, IDGradeLevel, IDDomain, IDStrand, IDStandard, StanID)
Select
TMP.Grade, TMP.Domain, TMP.StanNum, TMP.SGroup,
TMP.Strand, TMP.StanDesc, TMP.SubStrand,
TMP.IDContentArea, TMP.IDGradeLevel,
TMP.IDDomain, TMP.IDStrand, TMP.IDStandard, TMP.StanID
From tblMMStateStandardsTEMP TMP
Left Outer Join tblMMStateStandards ST On TMP.StanID=ST.StanID
Where ST.StanID is null
When I run this in QA, it works fine. When I use the statement in an Execute SQL Task and try to parse it, I get an error in which the source is 'Microsoft JET Database Engine' with the following description; 'Syntax Error in INSERT INTO statement'.
What could be causing this error?
CSDunn
August 17, 2004 at 11:13 am
Try changing the "Insert tblMMStateStandards" to
"INSERT INTO tblMMStateStandards"
Good Hunting!
AJ Ahrens
webmaster@kritter.net
August 17, 2004 at 1:11 pm
What does you connection look like. 'Microsoft JET Database Engine' makes me think it is trying to use an Access DB or Excel file and not a SQL Server connection. Check your connector.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply