Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: base table problems!!

Re: base table problems!!

From: Wayne McKinney <wmckinney_at_tiainfo.com>
Date: 1998/09/04
Message-ID: <6soqoh$9sr$1@news0-alterdial.uu.net>#1/1

I'm not sure how a VALUES statement could not be generated automatically on a true base table, but I think I do know of a way to chase back to the INSERT that Oracle builds for you.

Are you familiar with how to query from non-base table fields on a form? One way of doing it is by programmatically extending the WHERE clause. This is done by first finding a VARCHAR or CHAR field and increasing it's size to a very large number like 300 or 500 characters. Then, in the a PRE-QUERY, construct the extension to the WHERE clause. If the extended field has a value then say:
where_string := '#='||field_value||' and key_field = (subquery here using the non-base table field)'

See the '#' symbol? That's a substitution variable that allows you to attach the 'where_string' variable onto the end of the WHERE clause that Oracle automatically builds.

Usually, if I want to see the SQL query that Oracle builds, I put a small syntax error in the 'where_string'. That way, when you press <F8> or some other key to display the error, you see what the SELECT clause was. Don't worry about where you put the syntax error. Look at the other part of the statement to see what Oracle is doing.

Though I've never done it, you should be able to do the same thing in an INSERT statement and in a PRE-INSERT trigger. Try it and see if Oracle tells you what's going on.

ªü´ö Thenardier wrote in message <35eedae1.944985_at_news.netvigator.com>...
>
>what makes a base table block lose the VALUES keyword
>for INSERTing rows?
>
>in customizing oracle finance, i use the template.fmb
>provided by oracle to create new forms. in a form,
>i have a block which associates with a base table.
>in runtime, when i press the save button on the
>default toolbar to save the rows, the form raise
>an error message, telling me the VALUES keyword
>is missing!! but it is a base table! i dont think
>i need to write any INSERT statement to insert
>new records!
>
>can anyone tell me what happen? or tell me how
>to chase back to the base table's INSERT statement?
>
>thanx!
>
>
>rgds,
>thenard
>-------
>Pls remove .hk in reply
Received on Fri Sep 04 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US