显示标签为“inside”的博文。显示所有博文
显示标签为“inside”的博文。显示所有博文

2012年3月11日星期日

Any T-SQL command can show the description of specified table columns?

I want to ask something because i need.

Any SQL/T-SQL command inside MsSQL Server 2000 can show the description of {all table columns or specified table columns} of specified table inside specified database?

can you teach me how to do and any example(s)?Try checking out the INFORMATION_SCHEMA.COLUMNS view:


SELECT
*
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_CATALOG = 'myDatabase' AND
TABLE_NAME = 'myTable'

Terri|||You can also use the following:

exec sp_columns 'table_name'

This will return the list of columns for the table you specified.

2012年2月18日星期六

Any function?

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
>>
>>
>>
>

2012年2月16日星期四

Any function?

Hi, any function wich returns me if contains some string inside another
string for using on SP?
InStr?
Thanks
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
>
|||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...
>
|||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...
>
|||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...
>