mercredi 27 novembre 2019

SFDC "if" or CASE condition in soql

Here is my soql query

select ordernumber,productcode,UOM,itemseq,qty from order where createddate= today

output:

ordernumber  productcode itemseq UOM  qty

ord1           100        01      CS  20
Ord1           100        02      EA   7

ordernumber productcode itemseq qty1 qty2

ord1 100 01 20 Ord1 100 02 7

I tried the regular SQL case function but did not work so that i could get the output as:

basically splitting the qty into 2 columns based on the UOM CS/EA respectively Any help from the experts is much appreciated.

Aucun commentaire:

Enregistrer un commentaire