|
What's p.fldType? What other values will there be? Can you just select that column, along with the others, and have the caller decide whether to use them?
Or, use a stored procedure, declare a @FieldType int variable, and set it to be either 1 or NULL. Then select so.fldInvoiceNo * @FieldType, which if it's 1, will be the same value, and if it's NULL, will return NULL.
|