?
Solved

Can't select column from DataWindow

Posted on 2005-04-11
8
Medium Priority
?
344 Views
Last Modified: 2013-12-26
Greetings,

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.

0
Comment
Question by:mrong
  • 4
  • 3
8 Comments
 
LVL 33

Expert Comment

by:sajuks
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.
0
 
LVL 18

Accepted Solution

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


Cheers,
Rosh
0
 

Author Comment

by:mrong
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.

Thanks.
0
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

by:sajuks
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...
0
 

Author Comment

by:mrong
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?
0
 
LVL 33

Expert Comment

by:sajuks
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
0
 

Author Comment

by:mrong
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.

Thanks.
0
 
LVL 33

Assisted Solution

by:sajuks
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.
0

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