Title / Description
Code select i.invoice_pk, it.itemtype_pk, i.invoiceref_fk, case it.itemtype_pk when 1 then (select instruction_fk from item1details where item_pk=i.item_fk) when 2 then (select instruction_fk from item2details where item_pk=i.item_fk) when 3 then (select instruction_fk from item3details where item_pk=i.item_fk) when 6 then (select instruction_fk from item6details where item_pk=i.item_fk) when 7 then (select instruction_fk from item7details where item_pk=i.item_fk) when 15 then (select instruction_fk from item15details where item_pk=i.item_fk) else 1 end as instruction from invoices i, itemtypes it where i.invoiceref_fk=@inv and i.itemtype_fk=it.itemtype_pk and (i.rowstatus | it.rowstatus)=0
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code