BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Str handling functions in MS-SQL queries

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
DA Brookes
Guest





PostPosted: Fri Apr 23, 2004 8:55 am    Post subject: Str handling functions in MS-SQL queries Reply with quote



Hi

Is is possible to have substrings withing SQL, or have I got to redefine my
tabel to have a seperate field

If have an "issue" column with and issue value in and need to extract the
company code. I'd nomally use the copy function in delphi, assign it to a
variable and apply it to a setrange. but the situation is entirely different
via C/S.

I think microsoft uses midstr...
eg select * from table where midstr(issue,3,6) = 'WC001' can this work? if
so what is the correct syntax ?

Regards

Dave


Back to top
Bojidar Alexandrov
Guest





PostPosted: Fri Apr 23, 2004 10:42 am    Post subject: Re: Str handling functions in MS-SQL queries Reply with quote



Quote:
I think microsoft uses midstr...
eg select * from table where midstr(issue,3,6) = 'WC001' can this work? if
so what is the correct syntax ?

Why you think and not read the documentation? Docs for SQL Server are called
Books Online and they are installed by default.
What you need is the substring function.

Bojidar Alexandrov



Back to top
DA Brookes
Guest





PostPosted: Fri Apr 23, 2004 11:12 am    Post subject: Re: Str handling functions in MS-SQL queries Reply with quote



Thanks Bojidar..

Regards
Dave

"Bojidar Alexandrov" <bojo_do_not_spam (AT) kodar (DOT) net> wrote

Quote:
I think microsoft uses midstr...
eg select * from table where midstr(issue,3,6) = 'WC001' can this work?
if
so what is the correct syntax ?

Why you think and not read the documentation? Docs for SQL Server are
called
Books Online and they are installed by default.
What you need is the substring function.

Bojidar Alexandrov





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.