Viewing 6 posts - 1 through 7 (of 7 total)
thank you for all your help, I will do that
September 29, 2007 at 8:31 pm
Here is my sql
Insert into WaitList (candidate_no,exp_start_date,property_type,no_of_rooms,max_rent,no_of_people)
Select Columns FROM candidateTenant WHERE ID IN (2,4,5)
DELETE FROM dbo.Candidates WHERE ID IN (2,4,5)
ERROR The select list for the INSERT statement contains fewer items...
September 29, 2007 at 10:07 am
so sorry i dont understand, primary key in the first table needs to be inserted into the second tables and then i need to insert the rest of the columns...
September 29, 2007 at 9:10 am
try group by
SELECT DISTINCT field1
FROM Table1
WHERE (conditions)
GROUP BY field2 - hope this helps
September 29, 2007 at 6:30 am
I think I must be misunderstanding my querie, just cant seem to get it tow work
BEGIN TRANSACTION
USE KWEA;
INSERT INTO waitList(candidate_no,exp_start_date,property_type,no_of_rooms,max_rent,no_of_people)
SELECT 1,1-10-2007,'house',3,$300,4
UNION ALL SELECT 2,4-10-2007,'house',4,$350,4
...
September 29, 2007 at 4:57 am
Viewing 6 posts - 1 through 7 (of 7 total)