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!

Help with an SQL Expression

Status
Not open for further replies.

TomSalvato

Technical User
Mar 24, 2010
64
US
Hi All - I'm trying to create an SQL expression, but I need the filter to include a 'date' field that the user inputs when the report runs (a parameter field).
How exactly can I get that into an SQL expression? If it's even possible. To complicate matters a little more, the table field is a 'datetime' variable, and I just need to match the 'date' portion of it. Basically, I need the Oracle SQL equivalent of the following crystal code ...

date({MY_TABLE.DATEMODIFIED}) = {?Edit Date}

where {?Edit Date} is the user defined date var parameter.

Can this be done?

As always, any help would be greatly appreciated.

-TS
* running Crystal 2008 on Oracle DB.
 
Never worked out if you can use Parameters in a SQL expression. I suspect not.

Assuming you succeed and are just trying to convert datetime to date the Oracle syntax would be

trunc({MY_TABLE.DATEMODIFIED}) = {?Edit Date}

Ian
 
Yeah, it doesn't look like passing parameters to an expression field is going to be possible ... pretty annoying limitation, hopefully someone at BO/SAP is working on this for future releases. Thanx for trying, Ian. -TS

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top