SQL Query - Help needed !

  • Here is something very very similar :

    http://stackoverflow.com/questions/5452774/hotel-booking-rates-sql-problem

    I am having problem inserting datetimepicker parameters instead of the raw dates.

    Also I would like , instead of the price range , have datetimepicker range displayed.:hehe:

    As you can see over there DATEDIFF is a function common to SQL server as well as to Access.

  • regarding the link I mentioned,what I would like my query to display

    (using the example from over there) is :

    rate_id rate_start_date rate_end_date rate days

    0 2011-04-14 2011-04-15 66 1

    1 2011-04-15 2011-04-16 70 1

    (which means my datetimepicker1 is displaying rate_start_date as 2011-04-14

    and the other,datetimepicker2 is displaying rate_end_date as 2011-04-16).

  • sorry,result data is a little garbled because the page does not preserve formatting ...

  • As several have already told you, unless you take the time to provide us with the CREATE TABLE statement(s) for each table, sample data for each table as a series of INSERT INTO statements, and the expected results based on that sample data, you aren't going to get much help. We are all volunteers and we aren't going to take the time to build this ourselves. You need to help us help you. The benefit of you doing this work up front is you will get several people that will jump in to assist and you will get tested code in return. As this is also a SQL Server 2005 forum, the answer you get will be for SQL Server 2005, not Access.

    If you need help in Acces you should try posting your problem in an Access forum. I personally do not have the knowledge or experience to help you with access. My experience is with SQL Server as this is the database system I have used for over 12 years.

  • Here is all the data :

    http://www.sqlservercentral.com/Forums/Topic1131513-1292-1.aspx

    Posted a new question...

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply