Thanks! I was wondering about both of the comments you made. As for the
*...there isn't much in either table and I DO need it all...so it seemed
silly to have to reiterate every field??? 


Dian D. Chapman, Technical Consultant
Microsoft MVP, Certified MOS Expert
Editor/TechTrax Ezine
 
Free Tutorials: http://www.mousetrax.com/techtrax
Free Word eBook: www.mousetrax.com/books.html 
Optimize your business docs: www.mousetrax.com/consulting
Learn VBA the easy way: www.mousetrax.com/techcourses.html 


-----Original Message-----
From: Paul Manzotti [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 10, 2004 9:13 AM
To: [EMAIL PROTECTED]
Subject: Re: [ASP] SQL Query Syntax HELP!


Dian D. Chapman wrote:

>The last query in this monster...but I need help, please!
>
>I'm getting: Syntax Error (missing operator) 
>
>And I'm not sure I'm doing the join correctly???
>
>My eye are crossing and I can't figure out what I'm messing up now. Really
>appreciate some help...
>
>  gstrSQLQuery = _
>      "SELECT * FROM Referrals WHERE (" _
>          & "(Referrals.TellerID=" & "'" & strSingleTeller & "') " _
>          & "AND (Referrals.Sales='True') " _
>          & "AND (Referrals.ReturnDate BETWEEN (" _
>          & "'" & varReportFromDate & "' AND " _
>          & "'" & varReportToDate & "'))" _
>          & ") INNER JOIN Customer ON Referrals.CustomerID=" _
>          & "Customer.CustomerID ORDER BY TellerID"
>  
>
Inner join goes before the Where clause.

It's also generally not a great idea to do select *, but I think that 
stands even more when you start doing joins.

Cheers

manzo



---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 




-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.8 - Release Date: 12/8/2004
 

-- 
This email scanned and certified clean by AVG!
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.8 - Release Date: 12/8/2004
 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to