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

Command and Ingres DB

Status
Not open for further replies.

neskin

Programmer
Mar 13, 2002
104
AU
Hi there,
I am having problem to retrieve data from ingres db.Using ODBC connection
Since ingres has a unix date format i have created a view where unix date convert to windows _date(unixdatefield)as date_event_st
then i have created the command with parameters where they are a datetime type

select *
from view
where flight_id >0 and
date_event_st in ({?StartDate} , {?EndDate})

the command does not return any record
Does anyone has any solution may be to create a sp on ingres .i am going crazy with INGRES
using Crystal XI

regards,
Nat
 
I know nothing about Ingres, but you might try syntax like:

select *
from view
where flight_id > 0 and
date_event_st >= {?StartDate} and
date_event_st < {?EndDate} + 1

-LB
 
lb,
thank you anyway
ingres does't like the syntax
 
Your problem is that you don't know Ingres, which isn't a Crystal concern, try asking your dba or checking an Ingres forum.

If you already have a View, you shouldn't use a Command anyway, just point Crystal to the View as the databasource and then go into the Report->Selection Formula->Record and place:

(
{table.flight_id} > 0
)
and
(
date_event_st >= {?StartDate}
and
date_event_st < {?EndDate} + 1
)

Crystal will generate the filtering SQL and pass it to the View.

You're overcomplicating things by adding in a Command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top