Select into problem
- From: tijgertje <griet.schauwers@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 02:24:21 -0800 (PST)
Hi,
I have a problem concerning the select into statement.
I have created a procedure that contains dynamic sql, which creates a
variable number of columns.
The sql looks like :
@sql = 'select columnA, columnB, columnC,.... into #t from.....'
execute(@sql)
select * from #t
#t is nowhere defined as I cannot predict the number of columns nor
their data types.
The first time I launch the procedure it gives correct results.
However if i launch the procedure again with different arguments
( creating more, or less columns with different column names ) the
definition of #t does not change.
It seems that when the procedure ends it does not free up #t
Thanks in advance for some suggestions!
Griet
.
- Follow-Ups:
- Re: Select into problem
- From: Manish Negandhi
- Re: Select into problem
- Prev by Date: Re: Any equivalent of LIST() function in ADS?
- Next by Date: Re: Select into problem
- Previous by thread: Any equivalent of LIST() function in ADS?
- Next by thread: Re: Select into problem
- Index(es):
Relevant Pages
|