Results 1 to 4 of 4

Thread: ISQL Query

  1. #1
    Join Date
    Oct 2003
    Posts
    6

    Unanswered: ISQL Query

    Hi,

    I'm very new to SYBASE,ISQL and seeking help for the equivalent SYBASE ISQL query for the below ORACLE SQL query :

    1. select to_char(sysdate+2,'yyyymmdd') from dual;

    2. select Sub_id from Subscriber
    where to_char(Expiry,'YYYYMMDD')=to_char(sysdate+2,'YYYY MMDD');

    Thanks in advance,

    Regards,
    kkodava@maxis.com.my

  2. #2
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    Hiya,

    It is easier to post the results on Oracle the next time you ask questions on how to simulate a particular result on Sybase.


    On Oracle:
    select to_char(sysdate+2,'yyyymmdd') from dual;

    TO_CHAR(
    -------------
    20031022

    On Sybase:
    select convert(varchar(8),dateadd(dd,2,getdate()),112)
    -
    20031022

  3. #3
    Join Date
    Oct 2003
    Posts
    6

    Re: ISQL Query

    Thank you very much for your acurate and prompt reply btw is the below is ok if I need to get system date?

    select convert(varchar(8),dateadd(dd,0,getdate()),112)

  4. #4
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208

    Re: ISQL Query

    Originally posted by kodavalla
    select convert(varchar(8),dateadd(dd,0,getdate()),112)
    select convert(varchar(8),getdate(),112)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •