473,320 Members | 1,926 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Plz help. SQL help needed.

Eva
Hi,

Im new to Vb.net and am trying to create my first
practice project. The problem iv encountered is to do
with SQL queries issued against my Access DB iv created.
i want to wright a query that will pull all the caravan
details that are available at a partuclar date which will
be entered by the user at the interface. The query will
have to ensure that the caravans are not booked by
another guest for that specifed date period. the 3 tables
i need are:

Guest Info table:
Booking No (PK)
Name
Addr
Date of Arrival
Date of Departure

Caravan Booking table:
Caravan model No (PK, FK)
Booking No (PK, FK)

Caravan details table:
Caravan model No (PK)
Cost/day
Beds in caravan.

Can anyone help me with this query? How do i include the
dates that the user enters on my interface using the
DateTimePicker control into this query?

thx for your time. :o)
Jul 21 '05 #1
1 1423
based on your tables....... and the need to identify if a specific day is
available........

You didn't say how many of these caravans there were........ if there are
several...... it makes the problem more complex.......

but the bottom line is you probably will need to come from the angle of is
that field NULL..... ie... no reservation..... and take a join....
across all three tables..... starting at the details..... through the
booking..... back to the guest info....... just to see if they are
available......

You will run into an issue of........ start-end dates how you have the
tables lined up....... as you are not counting EACH day...... on a
seperate record...... making it more complex than if you had a table that
had a date for each day the caravan was booked....

"Eva" <an*******@discussions.microsoft.com> wrote in message
news:0e****************************@phx.gbl...
Hi,

Im new to Vb.net and am trying to create my first
practice project. The problem iv encountered is to do
with SQL queries issued against my Access DB iv created.
i want to wright a query that will pull all the caravan
details that are available at a partuclar date which will
be entered by the user at the interface. The query will
have to ensure that the caravans are not booked by
another guest for that specifed date period. the 3 tables
i need are:

Guest Info table:
Booking No (PK)
Name
Addr
Date of Arrival
Date of Departure

Caravan Booking table:
Caravan model No (PK, FK)
Booking No (PK, FK)

Caravan details table:
Caravan model No (PK)
Cost/day
Beds in caravan.

Can anyone help me with this query? How do i include the
dates that the user enters on my interface using the
DateTimePicker control into this query?

thx for your time. :o)

Jul 21 '05 #2

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

Similar topics

28
by: stu_gots | last post by:
I have been losing sleep over this puzzle, and I'm convinced my train of thought is heading in the wrong direction. It is difficult to explain my circumstances, so I will present an identical...
7
by: ChadDiesel | last post by:
Hello everyone, I'm having a problem with Access that I need some help with. The short version is, I want to print a list of parts and part quantities that belong to a certain part group---One...
7
by: Tina | last post by:
I have an asp project that has 144 aspx/ascx pages, most with large code-behind files. Recently my dev box has been straining and taking long times to reneder the pages in the dev environment. ...
10
by: Mae Lim | last post by:
Dear all, I'm new to C# WebServices. I compile the WebService project it return no errors "Build: 1 succeeded, 0 failed, 0 skipped". Basically I have 2 WebMethod, when I try to invoke the...
2
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on...
2
by: Steve K | last post by:
I got a bit of a problem I like some help on. I'm designing an online training module for people that work in food processing plants. This is my target audience. These workers have little or no...
3
by: Kitana907 | last post by:
Hi- I'm attempting to write a module that uses and updates info from two tables and does the following: Opens the recordset of a table called "tblstoreinv" If the Needed Field in the...
9
by: smartbei | last post by:
Hello, I am a newbie with python, though I am having a lot of fun using it. Here is one of the excersizes I am trying to complete: the program is supposed to find the coin combination so that with...
2
by: rookiejavadude | last post by:
I'm have most of my java script done but can not figure out how to add a few buttons. I need to add a delete and add buttong to my existing java program. Not sure were to add it on how. Can anyone...
32
by: =?Utf-8?B?U2l2?= | last post by:
I have a form that I programmatically generate some check boxes and labels on. Later on when I want to draw the form with different data I want to clear the previously created items and then put...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.