DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: SQL sytax error

  1. #1
    Join Date
    Apr 2005
    Posts
    17

    SQL sytax error

    I have a query created in MS access that have the following code (expressions) whats the equivalent of these expressions in sqlplus

    Select DateSerial(Mid([SPMFINV]![INV_DATE],1,4),Mid([SPMFINV]![INV_DATE],5,2),Mid([SPMFINV]![INV_DATE],7,2)) AS InvDate

    and

    select payment, IIf([PAY_DATE]>0,DateSerial(Mid([PAY_DATE],1,4),Mid([PAY_DATE],5,2),Mid([PAY_DATE],7,2)),DateSerial(Mid([SPMFINV]![INV_DATE],1,4),Mid([SPMFINV]![INV_DATE],5,2),Mid([SPMFINV]![INV_DATE],7,2))+IIf(Val([PAYMNT_DAY])=0,30,Val([PAYMNT_DAY]))) AS DueDate,


    What acn i use in place of the MID and IIF in SQLPLUS

  2. #2
    Join Date
    Apr 2003
    Posts
    353
    tochar
    or
    substr and tochar

  3. #3
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by engiri
    tochar
    he ment TO_CHAR
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  4. #4
    Join Date
    Apr 2005
    Posts
    17
    What about the iif (if and only if condition statement).

    Which sqlplus syntax can be used.

  5. #5
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    DECODE or CASE
    Jeff Hunter

Posting Permissions

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


Click Here to Expand Forum to Full Width