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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 how to insert with ||

Author  Topic 

rajasekhar857
Constraint Violating Yak Guru

396 Posts

Posted - 2009-05-06 : 10:28:23
how can i insert this record with symbol '||'

INSERT INTO EMRDiagnosisCodesLkup (DIAGNOSIS_ID, DIAGNOSIS_CODE, DIAGNOSIS_NAME, DIAGNOSIS_DESCRIPTION) VALUES (79, '009.1', 'Colitis, enteritis, &' ' gastroenteritis of presumed', '009.1-Colitis, enteritis, &' || ' gastroenteritis of presumed infect origin')
GO


it is giving message like

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '|'.

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2009-05-06 : 10:37:45
looks like a concatenation in oracle. are you actually using sql server?

Em
Go to Top of Page

rajasekhar857
Constraint Violating Yak Guru

396 Posts

Posted - 2009-05-06 : 10:40:33
yes iam it is oracle insert only now i have to insert it in sql server table too
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2009-05-06 : 10:42:55
for sql server instead of || you use +

Em
Go to Top of Page

rajasekhar857
Constraint Violating Yak Guru

396 Posts

Posted - 2009-05-06 : 10:59:43
ok its working thank you
Go to Top of Page
   

- Advertisement -