Link to home
Start Free TrialLog in
Avatar of joekeri
joekeriFlag for United States of America

asked on

need help with this SQL

i have the following table called TBLA
ID number
NAME varchar2
CLOSE_FLAG varchar2

I want to populate TBLA from TBLB
CUST number
CUST_NAME

and insert a 'N' to CLOSE_FLAG

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is my SQL

insert into TBLA values(
(select CUST    from TBLB),
(select CUST_NAME from TBLB),
 'N');

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 THIS IS WHAT I WANT TO DO..

take CUST and CUST_NAME from TBLB and insert it into TBLA , rows CUST and CUST_NUMBER, and insert an 'N' into CLOSE_FLAG
ASKER CERTIFIED SOLUTION
Avatar of dready
dready

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of joekeri

ASKER

excellent!!! bang on !!! to what i was tryign to do.. Thanks for your help....