eforce
10-28-2002, 04:28 PM
I have tbl1LinkTable & tbl2, they have same structure just tbl1LinkTable need to update tbl2. I know how to do this individually but is there an SQL command that allows you to simply use a wildcard to update all fields from one table to the next. I am working on 3 seperate update queries, all having many fields.
Please Help! ASAP!
E-Force
llkhoutx
10-28-2002, 06:35 PM
Build a query to do what you want in the QBE frame and they look at the sql code for same.
eforce
10-28-2002, 07:55 PM
In response to the above. I appreciate you responding but the question is not how to view the SQL version but I asked if there were a way to update table to table with one statement. Sort of a wildcard statement rather than the large SQL statement which makes you annotate each field to update. Sort of like:
UPDATE Table1 LEFT JOIN Table2 ON Table1.[POR ID] = Table2.[POR ID] SET Table1.[POC:] = [Tablel2].[POC:], Table1.[POR ID] = [Table2].[POR ID];
Is there such a SQL statement that would:
SET Table1.* = Table2.*
Rather than have to make individual SET statements for each field.
llkhoutx
10-28-2002, 08:29 PM
INSERT INTO tbtable1 ( ID, s1, s2, s3, s4, s5 )
SELECT tbTable2.ID, tbTable2.s1, tbTable2.s2, tbTable2.s3, tbTable2.s4, tbTable2.s5
FROM tbTable2;
Hopefully the foregoing gives you an idea of how to build your query.
Jon K
10-28-2002, 09:09 PM
> Is there such a SQL statement that would:
SET Table1.* = Table2.* <
I don't think you can use * in the SET clause of an Update Query.
llkhoutx
10-29-2002, 09:21 AM
Not that I know of, but I'm stupid.