Hi,
I am using Power Pivot to read in data from our server I am wanting to say if that if a field is blank to return prepaid, this works in normalk other query in excel but doesn't seem to work in the sql sever this is the code I am using
The error I am having returned is the 'The SQL statement is not valid. A column name cannot be blank.'
It is not the column but the field I am trying to reference.
Thanks
I am using Power Pivot to read in data from our server I am wanting to say if that if a field is blank to return prepaid, this works in normalk other query in excel but doesn't seem to work in the sql sever this is the code I am using
Code:
SELECT
adtrans.adnumbr
,adtrans.adnumpr
,adtrans.jimname
,adtrans.adcatgy
,adtrans.amtgros
,adtrans.adoper
, CASE WHEN adtrans.fred <> '' THEN adtrans.fred ELSE 'PREPAID' END
,insertbk.dateins
FROM
adtrans
, insertbk
, custacct
WHERE
adtrans.adnumbr = insertbk.adnumbr
AND custacct.custacc = adtrans.fred
The error I am having returned is the 'The SQL statement is not valid. A column name cannot be blank.'
It is not the column but the field I am trying to reference.
Thanks
Last edited: