Do Not Sell My Personal Information Jump to content


Delete Query - Access


PI100
 Share

Recommended Posts

Click here for image

Ok there are two files:

transaction file

and new car stock file

each file contains a field name called CarID

what i want the delete query to do is when the tranaction file-Car ID equals the New Car Stock-CarID the record containing the carID is deleted in the New Car Stock File

please help and i hope this make sense

thanks

Paul

Link to comment
Share on other sites


I could probably knock this up with a cuople of minutes but here's a short hand version of what the SQL should look like:

Delete from New Car Stock

where transaction.car id = new car stock.car id.

Of course MS Access doesn't make it that easy and there will be square brackets everywhere...

Link to comment
Share on other sites

the best way to do this is a trigger.

but I don't think access supports triggers.

considering the questions you have posted about this Paul - I would seriously recommending using a better DBMS such as SQL Server or Oracle (oracle used to offer v8 for free download - not sure about sql).

otherwise, in access, I suspect you'll need some kind of custom control that deletes from the tables you need. You just need to alter your form then to call this control, and pass CarID as a parameter.

Link to comment
Share on other sites

very very novice question but what is SQL server ??

http://www.microsoft.com/sql/default.asp

it sounds alot easier than this m/access stuff.

not necessarily easier.

but significantly better than Access - which is not much use for anything other than pretty mickey mouse usage.

If you want a better dbms than access, but don't have the money for SQL Server- then look into the freebie version of Oracle (although I find that its java applications for management run like crap - even on a decent pc).

Otherwise PostgreSQL is a good open source alternative.

Link to comment
Share on other sites


u cud always get mysql database its free 2 use.

so is PostgreSQL B)

MySQL is pretty cool.

LOC runs on a MySQL db :D

that said -I would not base any sort of enterprise level application on MySQL (then again - nor would I base it on Access! 8) )

it does not have the functionality such an application requires (views will not be implemented 'till version 5.1) nor would it scale to enterprise level volumes.

If Paul needs a better, free, DBMS - then I would say he should look at postgresql - it has a lot of the functionality any decent dbms should have (views, triggers and stored procedures would help from what I can tell).

but this is going :offtopic::blush:

Paul - no-one seems to be arguing with my idea of writing this delete processing yourself, within the scripting language your are using (ASP, php, VBA etc). IMHO, something like a trigger would be exactly what the doctor ordered, but if your DBMS of choice does not support that, then you need to look at implementing this fucntionality yourself ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...