>What is the definition of resume_erp (what is the result of: SHOW
CREATE 
TABLE resume_erp) ? What that error is telling you is that you are 

Glad you added more info, or I would have been asking you, 'what do you
mean by definition?' :)

CREATE TABLE `resume_erp` (
  `Candidate_ID` int(10) NOT NULL default '0',
  `Section_ID` int(10) default NULL,
  `Section_Value` longtext
) TYPE=MyISAM DEFAULT CHARSET=latin1

And if you need candidate_erp...I had figured candidate_erp was the
problem?...

CREATE TABLE `candidate_erp` (
  `Candidate_ID` int(11) NOT NULL auto_increment,
  `Vendor_ID` longtext,
  `Last_Name` longtext,
  `First_Name` longtext,
  `Middle_Initial` longtext,
  `Condition_Type` longtext,
  `Employer` longtext,
  `Country_ID` longtext,
  `Visa_Status` longtext,
  `Dt_Visa` longtext,
  `MMDD_Birth` longtext,
  `SSN` longtext,
  `CSG_Comments` longtext,
  `Working` longtext,
  `Available` longtext,
  `Start_Date` longtext,
  `Location` longtext,
  `HoldOnPeriod` longtext,
  `Relocation` longtext,
  `Tech_Ranking` longtext,
  `Comm_Ranking` longtext,
  `Availability` longtext,
  `Cert_Comments` longtext,
  `Dt_Submitted` longtext,
  `Def_Rate` longtext,
  `Def_Rate_Unit` longtext,
  `Other_Country` longtext,
  `Currency_id` longtext,
  `Interview_Availability` longtext,
  `Interview_Contact` longtext,
  `US_Experience` longtext,
  `Location_Country` longtext,
  PRIMARY KEY  (`Candidate_ID`)
) TYPE=MyISAM DEFAULT CHARSET=latin1


> INSERT INTO wow.resume_erp (Candidate_ID, Section_ID, Section_Value)
> SELECT SQL_CALC_FOUND_ROWS c.Candidate_ID, r.Section_ID,
> r.Section_Value
> FROM wow.tmpCandidates tc
> INNER JOIN wow.resume r
>         on r.Candidate_ID = tc.Candidate_ID
> INNER JOIN wow.candidate c
>         ON c.Candidate_ID = tc.Candidate_ID;

>The only reason you need to JOIN the table candidate to this query is
to 
>make sure that you don't add any records to resume_erp unless they have
a 
>corresponding record in candidate. If you are sure that all resumes
still 
>have their corresponding candidate records then you can drop the second

>INNER JOIN and just use the candidate_ID column from either resume or 
>tmpCandidates (your choice) in your SELECT clause.

Hmm, ok, thanks for this. Tells me I can safely drop te second INNER
JOIN then.

INSERT INTO wow.resume_erp (Candidate_ID, Section_ID, Section_Value)
SELECT SQL_CALC_FOUND_ROWS c.Candidate_ID
FROM wow.tmpCandidates tc
INNER JOIN wow.resume r
on r.Candidate_ID = tc.Candidate_ID;


- Eve




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to