Home » SQL & PL/SQL » SQL & PL/SQL » jobs question (Oracle 10gR2, Windows XP)
jobs question [message #408306] Mon, 15 June 2009 12:33 Go to next message
Messages: 98
Registered: April 2009
Location: Brasov, ROMANIA

let's say i have a table:

create table A (
id integer,
name varchar2(10)
b_id integer
constraint fk_Bid foreign key(b_id) references B(id)

create table B(
id integer,
start_date date,
end_date date)

B table can contain :

1 15.09.2008 23.02.2009 18.08.2009

now i wanna update the b_id from the table a using a job, so when sysdate becomes a date from start_date from the table B, i wanna update b_id from the table A with the corresponding id from B table
for example, in A table now i can have

1 'John' 1

tomorrow, being 16.06.2009, i wanna update that b_id with value 2. how can i do this using jobs?
Re: jobs question [message #408309 is a reply to message #408306] Mon, 15 June 2009 12:49 Go to previous message
Michel Cadot
Messages: 65138
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
i wanna update b_id from the table A with the corresponding id from B table

Which row of A do you want to update?

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Post a working Test case: create table and insert statements along with the result you want with these data.

Previous Topic: Dynamic crosstab script
Next Topic: Add a new hash partition to existing table
Goto Forum:

Current Time: Thu Aug 17 18:10:00 CDT 2017

Total time taken to generate the page: 0.08464 seconds