Solved How to convert an access delete query to Passthrough query (1 Viewer)

nector

Member
Local time
Today, 21:12
Joined
Jan 21, 2020
Messages
368
I have tried to convert this query below into a passthrough delete query but I keep on getting an error message from the SQL Server why?

Code:
DELETE tblItemClassList.itemlistID, tblItemClassList.itemClsCd, tblItemClassList.itemClsNm
FROM tblItemClassList
WHERE (((tblItemClassList.itemClsNm) Is Not Null));
 

tvanstiphout

Active member
Local time
Today, 11:12
Joined
Jan 22, 2016
Messages
224
And what is the error message?
And what is the error message if you run this in SSMS?
 

GPGeorge

Grover Park George
Local time
Today, 11:12
Joined
Nov 25, 2004
Messages
1,878
What error would that be, exactly? Sometimes we can help you diagnose problems from the details provided in an error message, but only when the error message itself is included.

I will say, though, that the DELETE syntax in SQL Server is different, as described here. TSQL delete
 

tvanstiphout

Active member
Local time
Today, 11:12
Joined
Jan 22, 2016
Messages
224
What error would that be, exactly? Sometimes we can help you diagnose problems from the details provided in an error message, but only when the error message itself is included.

I will say, though, that the DELETE syntax in SQL Server is different, as described here. TSQL delete
DELETE
FROM dbo.tblItemClassList
WHERE dbo.tblItemClassList.itemClsNm Is Not Null;

(or whatever namespace tblItemClassList is in).
 

cheekybuddha

AWF VIP
Local time
Today, 19:12
Joined
Jul 21, 2014
Messages
2,281
@nector, I'm curious as to whether you notice any actual benefit to using a pass-through with this simple query.
 

nector

Member
Local time
Today, 21:12
Joined
Jan 21, 2020
Messages
368
Well after trying many way , I have come realise that since I need to the entire data in the temporal table , the systex should be like below:

Code:
DELETE FROM tblItemClassList

This can delete the data in SQL server even if it has 350000 lines in less than 5 seconds and that is what I wanted from the passthrough query, its a great tool
 

Users who are viewing this thread

Top Bottom