Re: Forms 3.0 question

From: B C Zygmunt <bzy_at_ornl.gov>
Date: Thu, 10 Mar 1994 12:56:42 GMT
Message-ID: <1994Mar10.125642.12925_at_ornl.gov>


In article 17769_at_srg.srg.af.mil, mholt_at_srg.srg.af.mil (Mark Holt) writes:
>
> I'm want to build a .sql script from within a SQL*Forms 3.0 trigger, and
> then I want to execute it. I've included the trigger text below. The indicated
> lines are giving me trouble. As long as the system.last_query select statement
> doesn't have a where clause, everything works fine. The trouble arises when a
> where clause is generated (e.g. where name='jerry'). The single quotation marks
> are screwing things up, since that's the character that groups characters into a
> string. So, if I expanded the string I manufacture below, it would look
> something like this:
>
> 'echo -n select name from table where name='jerry''
>
 

[ Stuff deleted ]

I'm not a Forms user (yet), but I've done similar things with SQL scripts. It's not fancy, but it works.

define name = "'jerry'"
select name from table where name=&name

Beverly

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
+                                    +                             +
+  Beverly Cather Zygmunt            +  Phone: (615) 574-1007      +
+  Oak Ridge National Laboratory     +  email: zygmuntbc_at_ornl.gov  +
+  Building 4500N, MS 6274           +         bzy_at_ornl.gov        +
+  Oak Ridge, TN 37831-6274          +                             +
+                                    +                             +
+                                    +                             +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+                                                                  +
+  "If you torture your data long enough, they will tell you what  +
+  you want to hear." -- James L. Mills                            +
+                                                                  +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
Received on Thu Mar 10 1994 - 13:56:42 CET

Original text of this message