dbTalk Databases Forums  

oracle sql to sequel server sql

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss oracle sql to sequel server sql in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mf
 
Posts: n/a

Default oracle sql to sequel server sql - 12-18-2003 , 05:19 AM






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

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: oracle sql to sequel server sql - 12-18-2003 , 05:54 AM






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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.