 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
DA Brookes Guest
|
Posted: Fri Apr 23, 2004 8:55 am Post subject: Str handling functions in MS-SQL queries |
|
|
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
|
Posted: Fri Apr 23, 2004 10:42 am Post subject: Re: Str handling functions in MS-SQL queries |
|
|
| 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
|
Posted: Fri Apr 23, 2004 11:12 am Post subject: Re: Str handling functions in MS-SQL queries |
|
|
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 |
|
 |
|
|
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
|
|