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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with SQL Expression Field

Status
Not open for further replies.

adlaan

Programmer
Apr 18, 2002
1
NL
When I create an SQL expression using Crystal SQL Designer the expression works fine. However, when I copy the expression to an SQL Expression Field within a Crystal Report it gives an ODBC error: SQL0104 Token . is invalid. Valid: , FROM INTO
All changes to the expression give the same or other error messages.
Is this a known problem and how can I solve this?
The original SQL expression was:

SELECT
WERK."WERK20"
FROM
"S44156DA"."CAZONTDTA"."WERK" WERK
WHERE
WERK."JOBNBR" = '350906' AND
WERK."PD2UAA" = 1.00 AND
WERK."PD576A" = 1.00

I use CR 8.5 together with DB2/400.

Thanks
 
The SQL Expression field, unfortunately, does not accept full select statements. You can do things like convert, add, concatenate etc. Things that you could do with formulas in crystal.. it just shunts it off to the server (which is very useful if one is also evaluated as a paramter).

For now, for embedded "select" SQL you need to either use a subreport or a SP. I think you can use Crystal SQL Designer as well (I rarely use it so can't comment for certain).

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top