dbTalk Databases Forums  

Last record of a result set

comp.databases.oracle.server comp.databases.oracle.server


Discuss Last record of a result set in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JAW
 
Posts: n/a

Default Last record of a result set - 10-05-2010 , 11:26 AM






cat dhtexp.sql

set heading off feedback off pagesize 0
--
spool zzz.par
prompt file=data.dmp
prompt log=data.log
prompt direct=y
prompt buffer=100000000
prompt userid=data
prompt tables=(
select ' '|| tablename ||','
from userz.tab_codes
where export='Y'
order by tablename;
prompt )
--
spool off
prompt exp parfile=zzz.par

A very minor issue. I generated export cards for a group of tables
in a codes table for an application upgrade.

The last line shows up with TABLENAME, as expected.

Though it is minor I was attempting to think of a way in SQL to take
care of.

Maybe LAG???

Reply With Quote
  #2  
Old   
Gerard H. Pille
 
Posts: n/a

Default Re: Last record of a result set - 10-05-2010 , 11:37 AM






JAW wrote:
Quote:
cat dhtexp.sql

set heading off feedback off pagesize 0
--
spool zzz.par
prompt file=data.dmp
prompt log=data.log
prompt direct=y
prompt buffer=100000000
prompt userid=data
prompt tables=(
select ' '|| tablename ||','
from userz.tab_codes
where export='Y'
order by tablename;
prompt )
--
spool off
prompt exp parfile=zzz.par

A very minor issue. I generated export cards for a group of tables
in a codes table for an application upgrade.

The last line shows up with TABLENAME, as expected.

Though it is minor I was attempting to think of a way in SQL to take
care of.

Maybe LAG???
select decode(rownum,1,' ',' ,') || tablename from (select tablename from userz.tab_codes where
export = 'Y' order by tablename);

?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.