Can't select column from DataWindow

Posted on 2005-04-11
Last Modified: 2013-12-26

I have a DataWindow which populate records from a table. I want to add one more field to the DataWindow. But when I tried to add a field from SQL statement for that DataWindow, I got the error message" ORA-00904:invalid column name"

Can anyone help me on this?
Thanks in advance.

Question by:mrong
    LVL 33

    Expert Comment

    how are you adding the field to the datawindow ?
    assuming your datawindow sql initailly lloks like this
    select field1,field2 from mytable
    where fieldid:as_string

    and if you want to add a new field into the dataobject
    >open the dataobject
    >Click on the button "SQL" or go to Dessign >datasource
    > if the sql opens in table layout then you can select whichever field u want to add from there itself
    or if it opens in sql view then you can add the new field ur new syntax would look like this
    select field1,field2,field3  from mytable
    where fieldid:as_string

    from the error u r getting it means that the field is not present in the table so first check in ur database profile as to which database you are connected to ...might be you are connected to the wrong db...
    secondly verify the field name that you are using.
    LVL 18

    Accepted Solution

    also check thru which user ur connected...

    at times columns are referred to as scott.empid

    check if u need to add the prefix of ur user to ur column in the select...


    Author Comment

    I selected the field from the table layout and also checked the SQL syntax. I checked the DB profile and are connecting to the right DB. The table name and field name are correct. I connect to the DB as the owner of that table.

    LVL 33

    Expert Comment

    are you using any retrieval arguments ?

    type your query in the database administartor and see if it runs properly.
    if yes the n copy that code to your datawindow sql and see if that works.
    are you using any reserved words ??
    can we see the select that you are issuing...

    Author Comment

    I think the problem is I use root.x.field1=:ax_num(I connect as root). I can save the SQL now. But when I tried to close the form, it keeps say"Design view cannot be closed".Why?
    LVL 33

    Expert Comment

    "I think the problem is I use root.x.field1=:ax_num(I connect as root)"
    so can you try without specifying an retrieval argment and see if that works..

    also can you buil one new dataobject from scratch and see if that working...

    and finally try x.field1 instead of root.x.field1 and check

    Author Comment

    Yes I tried x.field1=:ax_num and was able to save the SQL stmt, but I got message "Design view cannot be closed" when I tried to close the DataWindow.

    LVL 33

    Assisted Solution

    which version are we talking about ?
    are you trying to click on the "X" for the design --"your dataobject name"
    that wont close.
    either do a control +w  or
    ctrl +f or go to the file menu and close.
    tahts how you close a dw.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
    Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
    The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now