PDA

View Full Version : concatenate 2 fields and compare with third one


Twinkle
07-08-02, 08:44
Hey,

Can u tell me how do i concatenate fields
eg :
table1 : address_bk
Area_code char 3
phone char 7

table2 : phone
tel_no char 10

I want to concatenate both the fields in table1 , compare the results with table2 tel_no field and delete records from 1st table which are present in 2nd table...!

I use VB 6.0 as front end and SQL 7.0 as backend..!

thanx,
Twinkle:o

r937
07-08-02, 10:51
delete from address_bk
where Area_code+phone in
(select tel_no from phone)

rudy
http://rudy.ca/