I haven't tried this and don't really have and tables I want to remove data
from
but since a delete by definition removes a row the column names are
irrelevant and I
don't know why Access would even want them.

My feeling is that if you leave out table1.*, table2.* SQL Server will
accept it.
It already gets the table and row criteria from your "FROM"  , "JOIN"  and
"WHERE" clauses

Again I have not verified that the above works but it is worth a try.

Don

----- Original Message -----
From: "Bruce, Rodney" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 2:24 PM
Subject: OT: Convert ACCESS query to SQL query


> Need a little help with this,  just learning SQL server and am trying to
> convert over from ACCESS.
>
> In ACCESS my query looks like:
>
> DELETE table1.*, table2.*  FROM  table1 LEFT JOIN table2 ON table1.field=
> table2.field
> WHERE table1.field = variable;
>
> and works fine
>
> but removing *s does not work.  works if only deleting from one table.
>
> DELETE table1, table2  FROM  table1 LEFT JOIN table2 ON table1.field=
> table2.field
> WHERE table1.field = variable;
>
> IN SQL  when deleting, the *s are left out, I get this to work fine when
> only deleting from
> one table, I get the error message, when I remove the *s:
>
> Incorrect syntax near ','  How do you delete from more than one table at a
> time with SQL?
>
> I can get around this by changing to 2 queries:
>
> 1) del records in table 1 based on variable
> 2) del records in table 2 based on variable
>
> but I should be able to keep in one query, similar to the one used for
> ACCESS.
>
> some help please
> Rodney
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to