display result of select script with temp table

Feature requests and their debate

display result of select script with temp table

Postby igorewka » Wed Jun 19, 2013 2:17 pm

Hello,
e.g. select script:
select *
into #t1
from country t2
where t2.country_code = 'AD'

select *
from #t1

DROP TABLE #t1 --with or without this line

This script results in:
updated rows
------------------
1

Expected result:
Other tools, e.g. MS SQL Server Management Studio, Toad for SQL Server display result set of the last select

Do you think it's possible to implement this? I'm tired of using MS SQL Server Management Studio for such cases.
igorewka
 
Posts: 9
Joined: Wed Feb 27, 2013 7:00 am

Re: display result of select script with temp table

Postby Serge » Thu Jun 20, 2013 8:02 am

Hi,

How do you execute these 3 queries? As a single statement or as a script?
You can execute it as script with separate results tab for each query (ctrl+alt+x) but in fact it is not very convenient.

I can add config option which will tell DBeaver to omit non-resultset results (like updated rows count) for scripts. But may be there could be a btter solution..
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: display result of select script with temp table

Postby igorewka » Thu Jun 20, 2013 10:18 am

I execute all statements together as a script with alt+x.

Just in case, another more clean example, it's impossible to execute parts separately with ctrl+alt+x :
declare @t1 table(country_code varchar(2))
insert into @t1(country_code) select t2.country_code from country t2 where t2.country_code = 'AD'
select * from @t1

Current result:
updated rows
------------------
1

Expected result:
country_code
-----------------
AD
igorewka
 
Posts: 9
Joined: Wed Feb 27, 2013 7:00 am


Return to Feature Requests



Who is online

Users browsing this forum: No registered users and 3 guests