I assume you know the coding side so the only problem bit of SQL might be where you are "copying" the data (I'm assuming you mean inserting the data as a new row in another table);
INSERT INTO tblTestInsert ( Field1, Field2 )
SELECT Field1, Field2
FROM tblTest
WHERE...
Kenny,
my head hurt half way through that so I'll just give you a couple of pointers and avoid trying to understand the details. Firstly you can just add date/times after they are converted from strings e.g.
CDate(FirstTime) + CDate(SecondTime) will give you a date/time result that you can use...
Wow, I'm not sure why you want to do what you're trying to do but you can only have one table in the update statement main clause. i.e. it has to be Update Inventory Set ...
You then can use a straight select in the right hand of the set clause along the lines of;
Update Inventory
Set Location...
Is this something you want to run once to create all the table2 records from existing data in table1? If so you could achieve this with three inserts along the lines of:
insert into table2
(select field5 + 'A'
from table1
where field5 <> 0);
insert into table2
(select field5 + 'B'
from table1...
Try this:
Select a.Org, a.LastName, b.LastName
from tblMain a, tblMain b
WHERE a.LastName = "Macrae"
and b.LastName = "Test"
and a.Org = b.Org
Derek Macrae
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.