I have a table transactions, which has a column called Type. Type can be one of four values DEBT,INV,CRED or SUM.
I am writing a query to select only certain types dependant on a parameter passed to my query. For example if i pass DEBT i want to select only those transactions with a type of DEBT.
the problem i have is that i don't know how to do it if i only want to select 2 types (e.g CRED & DEBT ) of transaction. I can do it if i want all transactions or a single type using the following code:
type = DECODEp_type,'ALL',type, _type)
Any suggestions?
I am writing a query to select only certain types dependant on a parameter passed to my query. For example if i pass DEBT i want to select only those transactions with a type of DEBT.
the problem i have is that i don't know how to do it if i only want to select 2 types (e.g CRED & DEBT ) of transaction. I can do it if i want all transactions or a single type using the following code:
type = DECODEp_type,'ALL',type, _type)
Any suggestions?