1
Reply

How to use insert and select statement to fill a table

Abraham Olatubosun

Abraham Olatubosun

Feb 8 2017 1:41 PM
223
Dear Code Masters,
I believe all you you are doing fine and in good health.
 
i want to insert some record from table "REGIMEN" to table "Common_HIVQ" and i use the statement  below :
 
  1. INSERT INTO  Common_HIVQ (PatientIdentifier,VisitID,VisitDate,code14,codedesctxt15)    
  2. SELECT patientIdentifier,visitid32,visitdate33,code34,codedesctxt35 FROM Regimen WHERE VisitDate33 <> Common_HIVQ.VisitDate  
but i get the following error "
Msg 4104, Level 16, State 1, Line 3
The multi-part identifier "Common_HIVQ.VisitDate" could not be bound.
"
please i have done every thing to correct this error but to no result. Kindly help me
 

Answers (1)