Hi, any function wich returns me if contains some string inside another
string for using on SP?
InStr?
ThanksCHARINDEX ,PATINDEX'
"Paulo" <prbspfc@.uol.com.br> wrote in message
news:u2BJWIUeIHA.4844@.TK2MSFTNGP04.phx.gbl...
> Hi, any function wich returns me if contains some string inside another
> string for using on SP?
> InStr?
> Thanks
>|||if CHARINDEX('5.0', SELECT @.@.VERSION) = 0 then 'WIN 2000
if CHARINDEX('5.1', SELECT @.@.VERSION) = 0 then 'WIN XP
if CHARINDEX('5.2', SELECT @.@.VERSION) = 0 then 'WIN2K3
Should work?
Thanks man!
"Uri Dimant" <urid@.iscar.co.il> escreveu na mensagem
news:uDZFoKUeIHA.5348@.TK2MSFTNGP03.phx.gbl...
> CHARINDEX ,PATINDEX'
> "Paulo" <prbspfc@.uol.com.br> wrote in message
> news:u2BJWIUeIHA.4844@.TK2MSFTNGP04.phx.gbl...
>> Hi, any function wich returns me if contains some string inside another
>> string for using on SP?
>> InStr?
>> Thanks
>>
>|||Paulo
CREATE TABLE #tmp (c VARCHAR(1000))
GO
INSERT INTO #tmp EXEC('SELECT @.@.VERSION')
SELECT CASE WHEN CHARINDEX('5.0', c) > 0 then 'WIN 2000'
WHEN CHARINDEX('5.1', c) > 0 then 'WIN XP'
WHEN CHARINDEX('5.2', c) > 0 then 'WIN2K3' END
FROM #tmp
"Paulo" <prbspfc@.uol.com.br> wrote in message
news:ucf0TSUeIHA.288@.TK2MSFTNGP02.phx.gbl...
> if CHARINDEX('5.0', SELECT @.@.VERSION) = 0 then 'WIN 2000
> if CHARINDEX('5.1', SELECT @.@.VERSION) = 0 then 'WIN XP
> if CHARINDEX('5.2', SELECT @.@.VERSION) = 0 then 'WIN2K3
> Should work?
> Thanks man!
> "Uri Dimant" <urid@.iscar.co.il> escreveu na mensagem
> news:uDZFoKUeIHA.5348@.TK2MSFTNGP03.phx.gbl...
>> CHARINDEX ,PATINDEX'
>> "Paulo" <prbspfc@.uol.com.br> wrote in message
>> news:u2BJWIUeIHA.4844@.TK2MSFTNGP04.phx.gbl...
>> Hi, any function wich returns me if contains some string inside another
>> string for using on SP?
>> InStr?
>> Thanks
>>
>>
>|||Thanks man... very good !
"Uri Dimant" <urid@.iscar.co.il> escreveu na mensagem
news:uqwDEZUeIHA.5208@.TK2MSFTNGP04.phx.gbl...
> Paulo
> CREATE TABLE #tmp (c VARCHAR(1000))
> GO
> INSERT INTO #tmp EXEC('SELECT @.@.VERSION')
> SELECT CASE WHEN CHARINDEX('5.0', c) > 0 then 'WIN 2000'
> WHEN CHARINDEX('5.1', c) > 0 then 'WIN XP'
> WHEN CHARINDEX('5.2', c) > 0 then 'WIN2K3' END
> FROM #tmp
>
>
>
> "Paulo" <prbspfc@.uol.com.br> wrote in message
> news:ucf0TSUeIHA.288@.TK2MSFTNGP02.phx.gbl...
>> if CHARINDEX('5.0', SELECT @.@.VERSION) = 0 then 'WIN 2000
>> if CHARINDEX('5.1', SELECT @.@.VERSION) = 0 then 'WIN XP
>> if CHARINDEX('5.2', SELECT @.@.VERSION) = 0 then 'WIN2K3
>> Should work?
>> Thanks man!
>> "Uri Dimant" <urid@.iscar.co.il> escreveu na mensagem
>> news:uDZFoKUeIHA.5348@.TK2MSFTNGP03.phx.gbl...
>> CHARINDEX ,PATINDEX'
>> "Paulo" <prbspfc@.uol.com.br> wrote in message
>> news:u2BJWIUeIHA.4844@.TK2MSFTNGP04.phx.gbl...
>> Hi, any function wich returns me if contains some string inside another
>> string for using on SP?
>> InStr?
>> Thanks
>>
>>
>>
>
没有评论:
发表评论