Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Does this work or do I have to use dynamic sql?
Marc Eggenberger <nw1_at_devnull.ch> wrote i
> Should this work:
<snipped>
Yep. A Daniel said, there are no glaring errors.
> It runs without errors but it seems that it doesn't actually update my
> table ud.
IMO that can only be because of the assumption that: ud.Username = metaupdate_rec.sNetzwerklogin (take a look at the WHERE clause of your update statement)
Marc, are you sure that this assumption is correct? Are there not maybe an issue with case here?
How about doing a SELECT count(*) join between the ud table and meta table using the WHERE clause you specified in the UPDATE? That way you will see whether this assumption is correct or not.
> Havent done much coding in Oracle yet.
Even so, you seem to have grasp the basics better than many other 1st time posters here that run into PL/SQL issues. Don't tell me. You know how to RTFM. Good for you. And keep it up. :-)
> In T-SQL I would put the Update statement in a varchar first and then
> exec it. Do I have to something similar in Oracle too?
No. The only time you want to use dynamic SQL is when you are dealing tablenames as variables, or column names and criteria as variables. Dynamic SQL only parses at the time of execution.
-- BillyReceived on Thu Jul 31 2003 - 01:09:16 CDT
![]() |
![]() |