cancel
Showing results for 
Search instead for 
Did you mean: 

example using SQL expression fields?

Former Member
0 Kudos

Hi all,

What is the use of SQL expression fields in crystal reports 2008? Is it similar to writing SQL queries in oracle? explain me with an example using SQL expression fields in crystal reports 2008... thanks,

--regards,

Durai.S

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Jason,

Thanks for your reply. And the statement given by you was understandable and I need to concern on this a lot. So,

Could be please suggest me a document in which I can get the relevant details of SQL Expression fields with an example?

--regards,

Durai.S

Former Member
0 Kudos

Here is a link to a good thread regarding SQL Expressions... []

Answers (1)

Answers (1)

Former Member
0 Kudos

Durai,

Actually the Add Command function is more akin to "writing SQL queries in oracle". The SQL Expression fields are used to insert a new field into the select list of the SQL statement generated by CR. It's useful if you want to, for example, create a calculated field using database specific functions.

A good example... A field in the database is a text type but the data being stored in it is all dates... and you want to cast or convert the field to date field before bringing it into CR.


CAST (TextField AS DateTime) AS NewFieldName

I don't know Oracle but I'm sure there are plenty of Oracle specific functions that you wish CR had. SQL Expressions give you the opportunity to use those (as long as you're actually connected to an Oracle database of course).

HTH,

Jason

Former Member
0 Kudos

Why would one rather use the SQL Espressions rather than a formula?