Home » Developer & Programmer » Forms » Oracle Error 00904 (oracle 6i client ,oralce 8i db)
Oracle Error 00904 [message #614373] Wed, 21 May 2014 04:09 Go to next message
shabbier.sa
Messages: 20
Registered: May 2014
Location: UAE
Junior Member

I am getting error ora-00904 invalid column
but there is no invalid column exists eitheir in db or in form.
Can any body help me to come out of this.
  • Attachment: ora-00904.jpg
    (Size: 146.39KB, Downloaded 725 times)
Re: Oracle Error 00904 [message #614374 is a reply to message #614373] Wed, 21 May 2014 04:11 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Check if you have not some lower case character in your column name.

[Updated on: Wed, 21 May 2014 04:12]

Report message to a moderator

Re: Oracle Error 00904 [message #614375 is a reply to message #614373] Wed, 21 May 2014 04:14 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
BETWEEN looks suspicious. You can't have
between 01-jan-2014 and 31-dec-2014
These DATE values should really be dates. I'd suggest you to use either DATE literal, such as
between date '2014-01-01' and date '2014-12-31'
or explicitly convert strings to dates with
between to_date('01.01.2014', 'dd.mm.yyyy') and to_date('31.12.2014', 'dd.mm.yyyy')

The way it is now, well, it is relly nothing.
Re: Oracle Error 00904 [message #614376 is a reply to message #614374] Wed, 21 May 2014 04:14 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
Take the select statement from the error message and run it in sqlplus and see what that says.
It's difficult to tell from the screenshot but it looks like the dates aren't wrapped in quotes. If so that's the problem, so where do the dates come from?

[Updated on: Wed, 21 May 2014 04:14]

Report message to a moderator

Re: Oracle Error 00904 [message #614377 is a reply to message #614373] Wed, 21 May 2014 04:17 Go to previous messageGo to next message
shabbier.sa
Messages: 20
Registered: May 2014
Location: UAE
Junior Member

set_block_property('update_sal',default_where,'dt between '||:d1||' and '||:d2);

because of this above condition the error is coming............
Re: Oracle Error 00904 [message #614378 is a reply to message #614377] Wed, 21 May 2014 04:19 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Yes quotes and DATE keywords are missing as Littlefoot said.

Re: Oracle Error 00904 [message #614379 is a reply to message #614378] Wed, 21 May 2014 04:22 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
Assuming d1 and d2 are date datatypes you should have just written:
set_block_property('update_sal',default_where,'dt between :d1 and :d2');


Forms has no issue with refering to the names of datablock items in where clauses, it does it implicitly all the time.
You should also get into the habit of writing the block name when refering to items.
Re: Oracle Error 00904 [message #614384 is a reply to message #614379] Wed, 21 May 2014 04:36 Go to previous messageGo to next message
shabbier.sa
Messages: 20
Registered: May 2014
Location: UAE
Junior Member

set_block_property('update_sal',default_where,'dt between :d1 and :d2');
write me the above condition properly.
i know because of ' missing on date columns ,error comes.can u please write the proper set condition
Re: Oracle Error 00904 [message #614385 is a reply to message #614384] Wed, 21 May 2014 04:42 Go to previous messageGo to next message
cookiemonster
Messages: 13921
Registered: September 2008
Location: Rainy Manchester
Senior Member
I did give the correct condition, try it.
Re: Oracle Error 00904 [message #614386 is a reply to message #614384] Wed, 21 May 2014 04:42 Go to previous messageGo to next message
shabbier.sa
Messages: 20
Registered: May 2014
Location: UAE
Junior Member

Thank You Cookie Monster. I got the solution .i was unnecessarily posted pipes|| in the condition.
Thank You Very Much.Much...............
Re: Oracle Error 00904 [message #614387 is a reply to message #614386] Wed, 21 May 2014 04:43 Go to previous message
shabbier.sa
Messages: 20
Registered: May 2014
Location: UAE
Junior Member

for all the others too very thanks for assisting this new boy.
Previous Topic: Searching through block
Next Topic: change height of text field
Goto Forum:
  


Current Time: Wed May 01 18:12:12 CDT 2024