1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development New to Oracle - please help

Discussion in 'Software' started by DreamTheEndless, 19 Mar 2008.

  1. DreamTheEndless

    DreamTheEndless Gravity hates Bacon

    Joined:
    27 Jan 2004
    Posts:
    1,554
    Likes Received:
    0
    I'm working in a bulky programing enviornment that makes things like text parsing a real pain taking many extra steps and lots of work. In the past, I've always had MSSQL as the back end where you can query with:
    select (1+1)​
    and get a result of 2 or
    select left('The String',4)​
    and get a result of "The "

    Oracle won't let me do that - it always wants a "from" statement - is there any way around this? Is there an easy way I can pass my text parsing off to the database?

    Thanks.
     
  2. Starfighter

    Starfighter New Member

    Joined:
    4 Apr 2004
    Posts:
    154
    Likes Received:
    0
    I suspect you've now got this solved, but for future reference for anyone stumbling across this thread:

    The syntax you want is "FROM DUAL"

    SELECT sysdate FROM DUAL;

    SELECT left('The String',4) FROM DUAL;

    DUAL is a magical pseudo table to allow functionality like this, see http://www.adp-gmbh.ch/ora/misc/dual.html
     

Share This Page