Unix Programming - using For loop

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > November 2006 > using For loop





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author using For loop
chaitu

2006-11-21, 1:19 pm

Hi,
Can anybody help me on how to select lines from two different files and

generate them in a loop. Here's the detailed explanation.

I have two tables like this fk_4.log and fk_5.log


fk_4.log containt the table name which have Foriegn keys and fk_5.log
contains the constraints names. I have taken these info from
syscat.references. I also made a db2look and they are the same.


fk_4.log


BLUEE.INDIVIDUAL_PROVIDER
BLUEE.INDIVIDUAL_PROVIDER_AUDIT
BLUEE.VENDOR_CLAIMS_SUB_NPI_AUDIT
BLUEE.VENDOR_CLAIMS_SUBMISSION_NPI
BLUEE.VENDOR_PAYMENT_NPI
BLUEE.VENDOR_PAYMENT_NPI_AUDIT
BLUEE.VENDOR_PROVIDER
BLUEE.VENDOR_PROVIDER_AUDIT


fk_5.log


SQL051122142952700
SQL051122142952670
SQL051122142952540
SQL051122142952560
SQL051122142952590
SQL051122142952450
SQL051122142952640
SQL051122142952610


Now. is there a way to select both tables and constraints at the same
time and generate a loop suchthat the following command is executted?


db2 ALTER TABLE BLUEE.INDIVIDUAL_PROVIDER ALTER FOREIGN KEY
SQL051122142952700 NOT ENFORCED. I have tried using for loop but wasn't

successful.


Thank You in advance

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com