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!

I have forumal in my crystal but would like to do it in sql

Status
Not open for further replies.

sonny1974

Technical User
Feb 25, 2007
161
US
i have oracle 9i and crystal xi

this formula works in crystal

if ({Command.RANK}= 3 and previous ({Command.RANK})=2 ) and ({Command.QTY} = {Command.QTY}
and {Command.TRAN_CODE} = '28') or
({Command.RANK}= 3 and previous({Command.RANK})=2 and {Command.TRAN_CODE} <> previous({Command.TRAN_CODE}))then 1

but it wont work in my command statement , when i do a case in sql
can you help me on the coding so it works in my command
 
i heard there is a lead or lag in oracle, would that work here?
 
would i do a lead ?or lag?
choose? decode?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top