473,503 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL required for delete

Hello

I have an access database table which contains the fields 'room',
'datebooked' and 'lesson' amongst others.

I want to be able to do the following delete, for example :

Delete all bookings in room B4 on every Thursday lesson 4.

Can this be done in a single SQL statement or will I have to create a
recordset containing all the bookings in room B4, lesson 4 and then check
each record one by one to see if it is a Thursday? (ie using
if(weekdayname(weekday(datebooked)))="Thursday" then delete record etc)

I am using ASP VBscript
Thanks for any help.
Neil
Nov 13 '05 #1
2 1206
DELETE
FROM bookings
WHERE ((Room='B4'
AND Lesson=4
AND (Weekday([somedate]))=5));

Nov 13 '05 #2
Thanks for that pietlinden!

<pi********@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
DELETE
FROM bookings
WHERE ((Room='B4'
AND Lesson=4
AND (Weekday([somedate]))=5));

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
341
by: VIJAY KUMAR | last post by:
I know RFV works(executes) on both Client side and server side. But if I want to execute only on Client Side due to performance reason then what I have to do? Ex: I have a Text box which must...
1
1437
by: Timothy Madden | last post by:
Hello I have just read (in a MSDN article named Deep C++, in part 8) that member functions operator new and operator delete (and operator new and operator delete) are required in order to have...
16
8448
by: Georges Heinesch | last post by:
Hi. My form contains a control (cboFooBar), which has an underlying field with the "Required" property set to "Yes". Now, while filling out all the controls of the form, I have to fill out this...
3
3019
by: kaosyeti | last post by:
i have a form that has required fields and i have a delete button, created by the wizard, that has this code for onclick: Private Sub cmddeleterecord_Click() On Error GoTo...
0
972
by: Just D. | last post by:
All, What's the easiest way to create a Virtual Directory with required properties like: 1) delete all Start File names but insert only one required 2) one of the sub Directories should be...
3
2244
by: André | last post by:
Hi, I created a button in order to delete all the records at once in a gridview. But i get the error: No value given for one or more required parameters Thanks André The aspx file contains:...
1
3217
by: Ryan Liu | last post by:
Hi, When my code run to DataRow.Delete() It throws: System.ArgumentOutOfRangeException: Non-negative number required. Parameter name: length at System.Array.Copy(Array sourceArray, Int32...
0
1132
by: sheenaa | last post by:
Hi Everyone, I m using ASP.NET 2005 with C# and SQL SERVER 2005. I m using stored procedure and sql datasource control to retrieve the data. I want to use the trigger...
6
2466
by: mathewgk80 | last post by:
Hi all, I have two textboxes, txtName and txtDescription. i added required field validator to both of them. I have a Gridview in the same page. In tht gridview, i have a template field...
8
1521
by: Ramu528 | last post by:
Hi friends, I am new to PHP. i need validations for Delete a record. i store a column from Database table in a tabular format. i have edit and delete option. i need to write validations...
0
7198
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7072
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5570
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4998
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.