At 04:46 a.m. 10/03/2015, Pat Coleman [email protected]
[firebird-support] wrote:
>Hi
>
>I am having trouble writing a query in iReport using Firebird SQL
>
>I can get the query to work in MS Access, but Im not familiar with Firebird
>SQL, seems to be different .
Yes, Access "SQL" is not standard SQL.
>The access version of my query that works is
>
>
>SELECT CUSTOMFIELDVIEW.INFO AS OtherName, SO.NUM
>FROM CUSTOMFIELDVIEW INNER JOIN (SO INNER JOIN CUSTOMER ON SO.CUSTOMERID =
>CUSTOMER.ID) ON CUSTOMFIELDVIEW.RECORDID = CUSTOMER.ID
>WHERE (((SO.NUM)="763905") AND ((CUSTOMFIELDVIEW.CFID)=78));
Try this:
SELECT CUSTOMFIELDVIEW.INFO AS OtherName, SO.NUM
FROM CUSTOMFIELDVIEW
JOIN CUSTOMER ON CUSTOMFIELDVIEW.RECORDID = CUSTOMER.CUSTOMER.ID
JOIN SO ON SO.CUSTOMERID = CUSTOMER.CUSTOMER.ID
WHERE SO.NUM='763905' AND CUSTOMFIELDVIEW.CFID=78;
Take note that STRINGS in SQL are enclosed in single quotes (apostrophes) not
double quotes. Double quotes have a totally different function in SQL.
Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of "The Firebird Book" and "The Firebird Book Second Edition"
http://www.firebird-books.net
__________________________________________________________________
------------------------------------
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------
Yahoo Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/