|
-
Apr 17th, 2002, 03:33 AM
#1
Thread Starter
Member
Strange Access 2 Delete Query
I'm in the process of converting an old Access2 database to SQL server 7 and have come accross this query :
DELETE DISTINCTROW BOTrans.gl_tran_code, BOTrans.MatTest
FROM BOTrans
WHERE ((BOTrans.gl_tran_code) In ('stoki','stokr','stokx','wrton','tfer',"gjnl","jnal","jnye","jnye2","jnye3"))
It LOOKS like the person that wrote it was trying to delete only certain fields from the table, which I would normally use an update query for. Can anyone tell me if this delete query is (was)actually valid and if so what would it do ?
Thanks in advance
Ian.
Ian Clarke BSc (Hons) - Web Applications Programmer
Ricardo Consulting Engineers Ltd.
Email : [email protected]
-
Apr 17th, 2002, 03:43 AM
#2
Not come across that before.
Sorry
Looks vaguely liike Business Objects though.
Perhaps it was meant to delete the rows where the code matches those in that list... For what reason - only the original developer knows and they have probably forgotten by now 
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Apr 17th, 2002, 03:53 AM
#3
Thread Starter
Member
This is the line that really gets me : DELETE DISTINCTROW BOTrans.gl_tran_code, BOTrans.MatTest
Ignoring the DISTINCTROW for a moment, Delete dose'nt usually take any parameters does it ? So why have two field names afetr the delete command ? I know it's an Access 2 database, just can't find any reference to using delete in that way.
Ian Clarke BSc (Hons) - Web Applications Programmer
Ricardo Consulting Engineers Ltd.
Email : [email protected]
-
Apr 17th, 2002, 04:09 AM
#4
-
Apr 17th, 2002, 06:09 AM
#5
Addicted Member
wath a streange code
it certainly will not work
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|