Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
nisar
Starting Member
29 Posts |
Posted - 2010-03-07 : 01:25:48
|
| Hi,I am running one query like this 'left join dbo.IMP_101_DUEIN di on (di.duodocnoact+di.duodocnoorg+di.duodocnoshop+di.duodocnoserial)=replace(p.doc_ctrl_no,'-','')'whenever I do this I get error like this Invalid operator for data type. Operator equals subtract, type equals varchar.Whenever I remove replace statement it works fine any substitue for replace command or changes in this statement will any body suggestRegardsNisar |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-07 : 01:57:33
|
it should be'left join dbo.IMP_101_DUEIN di on (di.duodocnoact+di.duodocnoorg+di.duodocnoshop+di.duodocnoserial)=replace(p.doc_ctrl_no,''-'','''')' ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
nisar
Starting Member
29 Posts |
Posted - 2010-03-07 : 02:01:38
|
| great it works.thank you very much. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|