RE: Easy Q: Dummy table?
Posted in 1997
In article <62koso$tg@cssun.mathcs.emory.edu>,
richard_thomas@yes.optus.com.au ("Richard Thomas") wrote:
>
> Chad Chervitz wrote:
>
> > I have a need to print CURRENT variables from within a simple SQL file
> > being piped to dbaccess. It is so that I can surround a SQL
> > statement with two datetime selects to trace how long the SQL
> > statement took to run.
> >
> > Is there a way just to "select CURRENT" so that it gets output along =
> with
> > the SQL results?
> >
> > IOW, I'm looking for the equivalent of a tableless
> > select in Sybase (i.e., select sysdate()) or a DUMMY table select in
> > Oracle (i.e., select to_date("MM-DD-YYY", now) from DUMMY).
Someone also mentioned "select current from systables where tabid = 1".
If you want to make it more Oracle-like, just create a tiny table called
dummy, populate it with a single row, and then do "select current from
dummy". -- John H. Frantz
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet