Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How to get column name into variable

2 posts in Windows NT Last posting was on 2000-11-27 15:53:57.0Z
Thinus Knoetze Posted on 2000-11-27 13:33:58.0Z
Reply-To: "Thinus Knoetze" <thinusk@sybase.co.za>
From: "Thinus Knoetze" <thinusk@sybase.co.za>
Subject: How to get column name into variable
Date: Mon, 27 Nov 2000 15:33:58 +0200
Lines: 9
Organization: SYBASE
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <fir#MiHWAHA.202@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: 158.76.47.231
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1461
Article PK: 1088942

Hi2all

I need to use the column name of a column as a variable in a stored proc -
what is the shortest way to do this...

Thanx


Peter Veilleux Posted on 2000-11-27 15:53:57.0Z
Message-ID: <3A228395.1231EBF8@nvestservices.com>
Date: Mon, 27 Nov 2000 10:53:57 -0500
From: Peter Veilleux <pveilleux@nvestservices.com>
X-Mailer: Mozilla 4.72 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: How to get column name into variable
References: <fir#MiHWAHA.202@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 15
NNTP-Posting-Host: 206.136.227.183
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1459
Article PK: 1088931

Thinus,

trying querying syscolumns. Syscolumns.name is the column name. Check the
Reference Manul #3 for the other column descriptions. I don't know what
you're criteria is, otherwise I'd be able to help you more.

BTW, how come you didn't send this to the internal alias??? I'm sure someone
in E'ville or B'ton would have something back to you in minutes.....

HTH,

Pete

Thinus Knoetze wrote:

> Hi2all
>
> I need to use the column name of a column as a variable in a stored proc -
> what is the shortest way to do this...
>
> Thanx