If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Access DELETE DISTINCTROW query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Feb 2013
Posts: 43
Question Access DELETE DISTINCTROW query

Hi, I need help converting access DELETE DISTINCTROW query to SQL stored procedure. I am new to SQL and have no access experience.


DELETE DISTINCTROW TABLE1.*
FROM TABLE1;
Reply With Quote
  #2 (permalink)  
Old
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 14,776
Since that query makes no sense in Access 2000 or later, you must be using Access 2.0. In Access 2.0, that statement would delete every row in TABLE1. The equivalent statement in SQL 4.21a or later for your Access 2.0 example would be:
Code:
TRUNCATE TABLE TABLE1;
Note that you seem to be using a very, VERY old version of Access (possibly even before Microsoft bought the product). Be very careful to state what version you're using, since many things within Access have changed since then.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Feb 2013
Posts: 43
Thank you for your help Pat! You are correct about the access version the query comes from access 97.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On