November 24, 2012 at 11:30 am
Hi
I Have an existing table employeeSmall
create table employeeSmall
(
emp_id varchar(10),
salary varchar(10),
Misc1 varch(50),
Misc2 varch(150)
)
A New table has been designed employeeLarge which stores all the Misc1 and Misc2 into Misc
create table employeeLarge
(
emp_id varchar(10),
salary varchar(10),
Misc varch(500),
employeeMisID varch(5)
)
My old code inserted data into employeeSmall table
Now the new code inserted the data in employeeLarge table.
while reading the employee details i should consider reading from the new table employeeLarge first and if there is no record then i need to read from the old table employeeSmall
Could you help me the best way of doing this...
Thanks
Subha
November 24, 2012 at 11:48 am
November 24, 2012 at 2:37 pm
Even easier... use MERGE and migrate everything from the old table to the new table so you do't have to do this check for future inserts, etc.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply