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

Command OBbject SQL Not pulling data

Status
Not open for further replies.

crystal28

Programmer
Oct 23, 2002
108
US
select
table1.s2name1,
table1.s2name2,
table1.s2add1,
table1.s2add2,
table1.s2city,
table1.s2state,
table1.s2zip,
table1.s2country,
table1.s2phone,
table1.carrier,
table1.service,
table1.shipdate,
table1.dc,
table1.treax26 MANIFESTOR,
table1.treax15,
table1.treax34,
table1.treax9,
table1.treax8,
table2.employee_pin,
table2.passw,
table1.treax26,
table2.employee_name,
table2.security_access

from

table1,table2

where

table1.treax34='Fraud Address'



and (

(table2.store_no=1 and table2.store_no=table1.dc)
or

(table2.store_no=0 and 1=table1.dc)

)


and (table1.shipdate >='2007-11-28')

and table1.dc='01'

and (table2.security_access='adm'

or table2.security_access='sup')

and table1.treax26=table2.employee_pin

and table2.passw='101662'

and '772541'=table2.employee_pin;


In the above query when i add the where condition it doesnt pull up the data from the back end whereas it pulls the data even with the where conditionwhen i try from oracle sql developer.so i think i need to trim or use chr function well to do this,please help make it work in command object in crystal 10


doesnt work from this where onwards

and (table1.shipdate >='2007-11-28')

and table1.dc='01'

and (table2.security_access='adm'

or table2.security_access='sup')

and table1.treax26=table2.employee_pin

and table2.passw='101662'

and '772541'=table2.employee_pin;

 
I replaced the where with the selection formula but this is not how i want to do it because it needs to be in the SQL command object itself,here is the selection formula please tell me the equivalent command object sql where for this


{Command.DC}='1'

and ({Command.SECURITY_ACCESS}='adm' or {Command.SECURITY_ACCESS}='sup')

and ({Command.SHIPDATE} >='2007-11-28')

and {Command.FLEX26}=chr({Command.EMPLOYEE_PIN})

and {Command.PASSW}='101662'

and 772541={Command.EMPLOYEE_PIN}

and {Command.FLEX34}='Fraud Address'

and (

({Command.STORE_NO}=1 and chr({Command.STORE_NO})={Command.DC})
or

( {Command.STORE_NO} = 0 and '1' ={Command.DC})

)

and {Command.FLEX26}=chr({Command.EMPLOYEE_PIN})
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top