Can't select column from DataWindow

Posted on 2005-04-11
Medium Priority
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
  • 4
  • 3
LVL 33

Expert Comment

ID: 13758954
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 maually..so 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

diasroshan earned 120 total points
ID: 13759453
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

ID: 13760998
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.

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

LVL 33

Expert Comment

ID: 13761013
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

ID: 13761115
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

ID: 13761151
"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

ID: 13761212
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

sajuks earned 80 total points
ID: 13761254
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.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month15 days, 20 hours left to enroll

850 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