In Query Analyzer, I typed in the following:
"Select space(13)+[cus-loan] as account from Minimaster"
It returned a list of loan numbers all starting with 13 spaces. Next I typed in:
"Select space(13)+[cus-loan] as account, [cus-name] from Minimaster"
This time I got the following error:
"Invalid operator for data type. Operator equals Boolean AND, type equals nvarchar."
Cus-loan is a varchar data-type in the table. Why does this work if it is the only field I ask for but not when I ask for additional fields as well?
Also, is there a one command approach to trim a string, or do you have to do LTRIM(RTRIM(field)) every time?
Thanks,
Gladys
Gladys Clemmer
gladys.clemmer@fifsg.com
"Select space(13)+[cus-loan] as account from Minimaster"
It returned a list of loan numbers all starting with 13 spaces. Next I typed in:
"Select space(13)+[cus-loan] as account, [cus-name] from Minimaster"
This time I got the following error:
"Invalid operator for data type. Operator equals Boolean AND, type equals nvarchar."
Cus-loan is a varchar data-type in the table. Why does this work if it is the only field I ask for but not when I ask for additional fields as well?
Also, is there a one command approach to trim a string, or do you have to do LTRIM(RTRIM(field)) every time?
Thanks,
Gladys
Gladys Clemmer
gladys.clemmer@fifsg.com