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

sql expression throwing ERROR - driving me bonkers

Status
Not open for further replies.

LMCRYER

Programmer
Jul 30, 2001
388
US
I'm in Crystal 8.5 making a sql expression and this is ALL
I am asking it to do:

***************************
SERVPROV."PROVFIRSTNAME" + ' ' + "SERVPROV.PROVLASTNAME"
***************************

When I check it, it says no errors. I then save it, and go back to the design screen and pop it on there.
I then get nasty messages that say "ORA-00904 Invalid
Column Name"

what the heck is that all about???

LMC cryerlisa@hotmail.com

select * from Management where proj_mgmt_skills <> NULL

0 records returned
 
Try creating it with just the column names without any quotes. Note that the quotes are in different locations in the example you gave.

You might also try applying the latest hotfixes if that fails, but I suspect that's the error.

-k
 
ok, I changed it to be like this:

SERVPROV.PROVFIRSTNAME + ', ' + SERVPROV.PROVLASTNAME

still the error...I'm off to look for hotfixes... LMC cryerlisa@hotmail.com

select * from Management where proj_mgmt_skills <> NULL

0 records returned
 
Try:
--------------------------------
&quot;SERVPROV&quot;.&quot;PROVFIRSTNAME&quot; + ' ' + &quot;SERVPROV&quot;.&quot;PROVLASTNAME&quot;
--------------------------------

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
NOPE. I am beginning to think that I truly hate this little sql query designer - it feels so limiting when I could do this stuff so nice and smooth inside of a stored procedure!!

any other ideas out there? LMC cryerlisa@hotmail.com

select * from Management where proj_mgmt_skills <> NULL

0 records returned
 
Dear LMCRYER,

Here is a suggestion:

Place the two fields in the sql expression on the report canvas. I don't know why this makes a difference, but it has happened to me. If I use fields in the SQL Expression Builder that are not on the report, the Query throws an error.

This usually only happens with blob fields, but it is worth a shot.

Also, are you typing the field names in or selecting them from the list of available fields by double-clicking. What format does Crystal default to?

Hope this helps,

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
You're using the SQL Designer, as in the dreaded Crystal SQL Designer???

Try placing the tables directly in Crystal Reports and creating the joins, then use the SQL Expression in there.

I dumped the SQL Designer years ago, and in CR 9 it's pointless as you can use real SQL.

-k
 
LET's Go back to your original problem....there WAS a syntax error that no one commented on

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[b/]

I'm in Crystal 8.5 making a sql expression and this is ALL
I am asking it to do:

***************************
SERVPROV.&quot;PROVFIRSTNAME&quot; + ' ' + &quot;SERVPROV.PROVLASTNAME&quot;
***************************

When I check it, it says no errors. I then save it, and go back to the design screen and pop it on there.
I then get nasty messages that say &quot;ORA-00904 Invalid
Column Name&quot;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[b/]

&quot;SERVPROV.PROVLASTNAME&quot; should be
SERVPROV.&quot;PROVLASTNAME&quot;

That will probably fix the problem Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top