Results 1 to 5 of 5

Thread: Views

  1. #1
    Join Date
    Aug 2003
    Posts
    328

    Unanswered: Views

    I am making a view and want to populate a date field with a number. It looks something like this:
    create or replace view...
    select name,id, new_date(to_date(old_date,'yyyy/mm/dd'))
    from table

    All the fields exist in the main table, but I keep getting an error that says:

    new_date(to_date(old_date,'yyyy/mm/dd'))
    *
    ERROR at line 6:
    ORA-00904: invalid column name

    Why can't I do this in my select, and how can I get around this?
    Thanks.

  2. #2
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208

    Re: Views

    What is New_Date() ?

  3. #3
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Try

    create or replace view...
    select name,id, to_date(old_date,'yyyy/mm/dd') as New_Date
    from table

    hth
    Gregg

  4. #4
    Join Date
    Aug 2003
    Posts
    328

    Re: Views

    new_date is empty now, but I want to populate it with old_date which is a number string. new_date is in date format.
    Thanks.

  5. #5
    Join Date
    Oct 2003
    Location
    St.Louis,MO
    Posts
    120
    try "new_date" for the column name??

Posting Permissions

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