jay-are
asked on
Delete help
Hello Experts!
I'm trying to do something like this:
DELETE FROM FINANCE
WHERE vehmaster.status = '1' (SELECT * FROM FINANCE INNER JOIN VEHMASTER ON FINANCE.STKNUM = VEHMASTER.STKNUM )
but I get this error: The column prefix 'vehmaster' does not match with a table name or alias name used in the query.
Do I have the incorrect syntax?
I'm trying to do something like this:
DELETE FROM FINANCE
WHERE vehmaster.status = '1' (SELECT * FROM FINANCE INNER JOIN VEHMASTER ON FINANCE.STKNUM = VEHMASTER.STKNUM )
but I get this error: The column prefix 'vehmaster' does not match with a table name or alias name used in the query.
Do I have the incorrect syntax?
What's the relevance of the (SELECT * FROM FINANCE INNER JOIN....) part?
Perhaps...
DELETE FROM FINANCE
INNER JOIN VEHMASTER ON FINANCE.STKNUM = VEHMASTER.STKNUM
WHERE vehmaster.status = '1'
DELETE FROM FINANCE
INNER JOIN VEHMASTER ON FINANCE.STKNUM = VEHMASTER.STKNUM
WHERE vehmaster.status = '1'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
DELETE FROM FINANCE
WHERE STKNUM IN (SELECT STKNUM FROM VEHMASTER WHERE status = '1' )
WHERE STKNUM IN (SELECT STKNUM FROM VEHMASTER WHERE status = '1' )
should he try them all out and see which one deletes the most records? :)))
set a timer to them and see which one executes fastest.
>>should he try them all out and see which one deletes the most records?<<
There are only two that are syntactically correct :) Perhaps he can average out. Randomly pick one or he other ....
There are only two that are syntactically correct :) Perhaps he can average out. Randomly pick one or he other ....
>>should he try them all out and see which one deletes the most records? :)))
I suggest DELETE * FROM FINANCE ;)
I suggest DELETE * FROM FINANCE ;)
>>DELETE * FROM FINANCE<<
I miss that MS Access syntax :)
I miss that MS Access syntax :)
jay-are,
This question is considered now to be technically abandoned:
03/23/2005 500 VB help! Open Visual Basic
https://www.experts-exchange.com/questions/21362341/VB-help.html
See here for more info:
Nobody answered my question. What do I do?
https://www.experts-exchange.com/Databases/Microsoft_SQL_Server/help.jsp#hi71
This question is considered now to be technically abandoned:
03/23/2005 500 VB help! Open Visual Basic
https://www.experts-exchange.com/questions/21362341/VB-help.html
See here for more info:
Nobody answered my question. What do I do?
https://www.experts-exchange.com/Databases/Microsoft_SQL_Server/help.jsp#hi71
ASKER
acperkins solution was the first one to work properly!
PePi, unfortunately I accidently did a "DELETE FROM FINANCE"... :( had to rebuild the whole thing.
PePi, unfortunately I accidently did a "DELETE FROM FINANCE"... :( had to rebuild the whole thing.
ASKER
acperkins, I posted a "please delete my question" in community service...
Thanks!
Thanks!
Thanks and I appreciate the points.