You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by vijayan k <vi...@yahoo.com> on 2006/06/09 20:30:02 UTC

equal query for derby " select sysdate from dual in oracle"

Hi,
   
  I like to get the system date from the derby SQL statment.
  in oracle we have default table "dual" here 
  if we write query as "select sysdate from dual" w'll get the system date.
   
  i need like this in derby
   
  Please help me out ASAP
   
  Thanks
   
  Vijayan.gk

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: equal query for derby " select sysdate from dual in oracle"

Posted by Suavi Ali Demir <de...@yahoo.com>.
Instead of "dual", in IBM lingo, i believe that table is called SYSIBM.SYSDUMMY1. 
   
  For example to test a connection you can use:
  SELECT 1 FROM SYSIBM.SYSDUMMY1
   
  or yours would be:
   
  SELECT CURRENT_TIMESTAMP FROM SYSIBM.SYSDUMMY1
   
  VALUES(1) would work in DB2/LUW but not work in OS/390 for example, but above version would work in all.
   
  Since Derby comes from IBM Cloudscape, it has this SYSDUMMY1 table.
   
  Regards,
  Suavi Demir
   
  
Manjula G Kutty <ma...@gmail.com> wrote:
  vijayan k wrote:

> Hi,
> 
> I like to get the system date from the derby SQL statment.
> in oracle we have default table "dual" here
> if we write query as "select sysdate from dual" w'll get the system date.
> 
> i need like this in derby
> 
> Please help me out ASAP
> 
> Thanks
> 
> Vijayan.gk
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
Hi,

I don't know much about oracle. But in derby if you give the following 
command

VALUES CURRENT_TIMESTAMP

you will get the current system time.

For further reference please visit this link 
http://db.apache.org/derby/docs/dev/ref/rrefjdbc88908.html

Thanks
Manjula


Re: equal query for derby " select sysdate from dual in oracle"

Posted by Manjula G Kutty <ma...@gmail.com>.
vijayan k wrote:

> Hi,
>  
> I like to get the system date from the derby SQL statment.
> in oracle we have default table "dual" here
> if we write query as "select sysdate from dual" w'll get the system date.
>  
> i need like this in derby
>  
> Please help me out ASAP
>  
> Thanks
>  
> Vijayan.gk
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
Hi,

I don't know much about oracle. But in derby if you give the following 
command

VALUES CURRENT_TIMESTAMP

you will get the current system time.

For further reference please visit this link 
http://db.apache.org/derby/docs/dev/ref/rrefjdbc88908.html

Thanks
Manjula