|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/31/2007 4:05:00 PM
Posts: 9,
Visits: 1
|
|
Can i write a Select statement in Mload? IF not how do i assign a value from the table for Null value in the file. Thank you.
Rao Ghanta
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 9/4/2008 1:20:38 PM
Posts: 215,
Visits: 395
|
|
|
No, MLOAD does not process select statements, nor does it allow subqueries in DML statements. To assign a value from a query, one method would be to execute an update statement in BTEQ. Use a correlated subquery in the update statement to select values to be applied to the target table.
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/31/2007 4:05:00 PM
Posts: 9,
Visits: 1
|
|
Yes, If i excute from BTEQ it will works fine. But my problem is I am receiving null value in the file, insted of loading null value i have to get that value from another table matching his ID and update the master table. I have update and insert statements existed in my load and currentlly it is loading null values into master table. Any help would be great. Thanx.
Rao Ghanta
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 9/4/2008 6:57:31 AM
Posts: 28,
Visits: 153
|
|
Hi,
The best remedy as per my knowledge for this issue would be, Load the data from flat file into one staging table. Then using bteq ,we can compare the values as well as replace nulls with desired values.
Dhiraj P
|
|
|
|