dbTalk Databases Forums  

SQL Syntax Error Message

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SQL Syntax Error Message in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dean Gross
 
Posts: n/a

Default SQL Syntax Error Message - 02-10-2004 , 10:33 AM






I am using the DTS Query Designer (SQL 2000-SP3) to get data from an MS
Access 97 database. If I add more than 2 tables and join them together, the
Verify SQL command give me an error message as follows: ADO-syntax
error(missing operator) in query expression 'Subcontract.[Subcontract
ID]=[Invoice Log].[Subcontract ID] INNER JOIN [Subcontract Payment Method]
ON Subcontract.[Subcontract Payment Method ID] =[Subcontract Payment
Method].[Subcontract Payment Method ID] INNER JOIN Vendor ON
Subcontract.Vend_NO ='.

Does anyone know why this would be happening. Joining only 2 tables does not
generate this type of error.

TIA,
Dean



Reply With Quote
  #2  
Old   
Russel Loski, MCSD
 
Posts: n/a

Default RE: SQL Syntax Error Message - 02-10-2004 , 12:11 PM






What is the query that you are using

My suspicion is that your query is too long. Try aliasing the tables with one letter identifiers

Russ

Reply With Quote
  #3  
Old   
Dean Gross
 
Posts: n/a

Default Re: SQL Syntax Error Message - 02-10-2004 , 12:21 PM



Thanks for the suggestion, but that did not help. Here is the SQL that can
not be verified. If I add parentheses around the first INNER JOIN, it will
pass the verification but then the () are erases and it will not execute.

SELECT s.[NTP Date], s.[Last Modified], s.[Final Submittal Documents
Received], il.[Submitted to AP], il.[Target Pay Date], il.[To AP], il.[To
Field], spm.Type,
spm.[Payment Method], il.[Subcontract ID],
s.[Subcontract ID] AS Expr1, s.[Subcontract Payment Method ID],
spm.[Subcontract Payment Method ID] AS Expr2
FROM Subcontract s INNER JOIN
[Invoice Log] il ON s.[Subcontract ID] =
il.[Subcontract ID] INNER JOIN
[Subcontract Payment Method] spm ON s.[Subcontract
Payment Method ID] = spm.[Subcontract Payment Method ID]

<Russel Loski>; "MCSD" <RLoski (AT) NSPMhotmail (DOT) com> wrote

Quote:
What is the query that you are using?

My suspicion is that your query is too long. Try aliasing the tables with
one letter identifiers.

Russ



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.