svibuk — 2012-03-27T06:02:11-04:00 — #1
in table1 i hvae columns E1,E2, E3,E4,E5,P1,P2,P3,P4,P5 if the values in e1,e2,e3,e4,e5,e6 are not null or blank i want to insert the data in table2 having fields EMAIl & Pass id it does not exists , else update
r937 — 2012-03-27T06:30:15-04:00 — #2
which database system are you using? mysql?
also, where did e6 come from? it is not a column in table1
and which values do you want to insert into table2? from which columns in table1?
svibuk — 2012-03-27T06:51:38-04:00 — #3
table1 has 10 columns E1--- E5 & P1-- P5 with data if any column from table1 ie E1-- E5 then skip the blank column rest data to be inserted in table2 having columns EMAIL & PASS EMAIL coulmn will contain data from column E1--E5 & pass will contain data P1---P5 if the E1 data already exists tehn update ELSE iNSERT i hope its clear x,z,c was the data from columns E
there is no E6
using sQl server
r937 — 2012-03-27T08:03:07-04:00 — #4
please explain "if the data already exists then update"
if which data exists where? then update what?
svibuk — 2012-03-27T08:20:23-04:00 — #5
if the same data from e1... to e5 exists the update table2, else insert if new data
it can be either update or delete the existing
guido2004 — 2012-03-27T08:37:33-04:00 — #6
r937 — 2012-03-27T08:44:32-04:00 — #7
update which columns in table 2 with what???
you do not seem to understand that we find your specifications to be very vague
perhaps you could give some sample data for each table and show exactly what needs to be done that way