1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

to_numnber - please what is wrong here?

Discussion in 'SQL PL/SQL' started by monkey, Jun 9, 2014.

  1. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Code (SQL):
    SELECT id_price, SUM, SELECT(to_number(SUM) FROM price)
    FROM price;
    Many thanks!!!

    Word

    Database

    SQL
    Oracle / PLSQL
    SQL Server
    MySQL
    MariaDB
    PostgreSQL

    Web Development

    HTML
    CSS
    Color Picker

    Language

    C Language

    More

    ASCII Table
    Linux
    UNIX
    Java
    Clipart
    Joke of the Moment

    Other Sites

    CheckYourMath
    BigActivities

    Oracle Basics

    (Scroll to see more)

    Oracle ALIASES
    Oracle AND
    Oracle AND & OR
    Oracle AVG
    Oracle BETWEEN
    Oracle COUNT
    Oracle DELETE
    Oracle DISTINCT
    Oracle EXISTS
    Oracle FROM
    Oracle FUNCTIONS
    Oracle GROUP BY
    Oracle HAVING
    Oracle IN
    Oracle INSERT
    Oracle INTERSECT
    Oracle IS NOT NULL
    Oracle IS NULL
    Oracle JOIN
    Oracle LIKE
    Oracle MAX
    Oracle MIN
    Oracle MINUS
    Oracle NOT
    Oracle OR
    Oracle ORDER BY
    Oracle REGEXP_LIKE
    Oracle SELECT
    Oracle SUBQUERY
    Oracle SUM
    Oracle UNION
    Oracle UNION ALL
    Oracle UPDATE
    Oracle WHERE

    Oracle Advanced

    (Scroll to see more)

    Change Password
    Check Constraints
    Comments in SQL
    Conditional Statements
    Cursors
    Data Types
    Declare Variables
    Error Messages
    Exception Handling
    Foreign Keys
    Functions
    Grant Privileges
    Indexes
    Literals
    Loops
    Primary Keys
    Procedures
    Question/Answer
    Revoke Privileges
    Roles
    Schemas
    Sequences
    Synonyms
    System Tables
    Tables
    Tablespaces
    Transactions
    Triggers
    Unique Constraints
    Users
    Views

    Home >
    Oracle/PLSQL >
    Oracle Error Messages

    Oracle/PLSQL: ORA-00936
     
  2. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Word

    Database

    SQL
    Oracle / PLSQL
    SQL Server
    MySQL
    MariaDB
    PostgreSQL

    Web Development

    HTML
    CSS
    Color Picker

    Language

    C Language

    More

    ASCII Table
    Linux
    UNIX
    Java
    Clipart
    Joke of the Moment

    Other Sites

    CheckYourMath
    BigActivities

    Oracle Basics

    (Scroll to see more)

    Oracle ALIASES
    Oracle AND
    Oracle AND & OR
    Oracle AVG
    Oracle BETWEEN
    Oracle COUNT
    Oracle DELETE
    Oracle DISTINCT
    Oracle EXISTS
    Oracle FROM
    Oracle FUNCTIONS
    Oracle GROUP BY
    Oracle HAVING
    Oracle IN
    Oracle INSERT
    Oracle INTERSECT
    Oracle IS NOT NULL
    Oracle IS NULL
    Oracle JOIN
    Oracle LIKE
    Oracle MAX
    Oracle MIN
    Oracle MINUS
    Oracle NOT
    Oracle OR
    Oracle ORDER BY
    Oracle REGEXP_LIKE
    Oracle SELECT
    Oracle SUBQUERY
    Oracle SUM
    Oracle UNION
    Oracle UNION ALL
    Oracle UPDATE
    Oracle WHERE

    Oracle Advanced

    (Scroll to see more)

    Change Password
    Check Constraints
    Comments in SQL
    Conditional Statements
    Cursors
    Data Types
    Declare Variables
    Error Messages
    Exception Handling
    Foreign Keys
    Functions
    Grant Privileges
    Indexes
    Literals
    Loops
    Primary Keys
    Procedures
    Question/Answer
    Revoke Privileges
    Roles
    Schemas
    Sequences
    Synonyms
    System Tables
    Tables
    Tablespaces
    Transactions
    Triggers
    Unique Constraints
    Users
    Views

    Home >
    Oracle/PLSQL >
    Oracle Error Messages

    Oracle/PLSQL: ORA-00936
     
  3. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    Hi.

    It is incorrect that in names of columns reserved keywords were used: SUM .


    Why this excess conversion: SELECT id_price, SUM, SELECT(to_number(SUM) FROM price) FROM price; ?



    Code (SQL):
    SELECT  
            ID_PRICE,
            SUMM_OF_PRICE,
            SUM(SUM_OF_PRICE) OVER () SUMM_ALL_PRICE
    FROM
           PRICE;
     
     
    monkey likes this.
  4. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    HELLO!
    jUST having table price havin columns id_pride and price_value (alias sum!- that was the misunderstanding, cause it is a keyword!) and want to add third column in result which would show values from second column, which are integers, converted to number!
    Many tanks!