It is saying
Give me a string from the enquirydetails attribute starting at position
(whereever you find the first instance of the string 'Form Name') + 11 and
keep going for this many characters ( wherever you find the first instance
of CHAR(10) in the enquirydetails attribute - whereever you find the first
instance of the string 'Form Name' + 11)
SQL Server would look very like this
SUBSTRING(EnquiryDetails, CHARINDEX('Form Name',EnquiryDetails) + 11,
CHARINDEX(CHAR(10),EnquiryDetails) - CHARINDEX('Form Name',EnquiryDetails)
+ 11)
--
----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"mf" <anonymous (AT) discussions (DOT) microsoft.com> wrote
Quote:
could anybody translate this oracle specific sql
statement to sequel server specific sql. pleassssse
substr(enquirydetails,instr(enquirydetails,'Form Name:')
+11,instr(enquirydetails,chr(10)) - (instr
(enquirydetails,'Form Name:')+11))
thank you |