problem in joiining my query
Posted on 2006-05-09
hi i have problem in my query,
the problem i encountered here is" result returned is non deterministic"
but when i hit OK another problem will occur " QT cannot be converted into numeric 30,6." QT is the value of prefix. please help me.....
ifnull(prefix,'',cast(prefix as char(5))) +
cast(select top 1 customeraccountsID from customeraccounts where customercode = 'T-00045') as varchar(12)) +
'-'+ cast(dateformat(getdate(),'yyMMdd') as varchar(12)) +'-'
+ REPLACE( STR(ifnull(valuecount,'',valuecount)+step, digits, 0 ),' ',IFNULL(ReplaceBlank,'',ReplaceBlank)) )
WHERE UCASE(keyname) = 'Quotation_NO';