Advertisement

07.17.2008 at 07:46AM PDT, ID: 23573378
[x]
Attachment Details

MS SQL QUERY DATE PROBLEM

Asked by Amit_Dogra in MS SQL DTS, MS SQL Server, SQL Server 2005

In ms sql database we are querying database from 25th april to 26th april and getting 50 records.
However when we are querying from 25th April to 25th April we are getting 0 records
 ,  when we are querying from 26th april to 26th april we are getting 0 records. Can you please look where we are going wrong. Here is the query we are using for this problem.

select count(b.RECORD_LOCATOR) AS RECORD_LOCATOR from TEST.DBO.EMPL_RECORD_LOCATOR_INFO a , TEST.DBO.CREDIT_CARD_PAID_PNR b where a.RECORD_LOCATOR = b.RECORD_LOCATOR AND a.BOOKING_DT BETWEEN '"+(String)al.get(0)+"' AND '"+(String)al.get(1)+"'"Start Free Trial
[+][-]07.17.2008 at 07:47AM PDT, ID: 22026005

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 07:49AM PDT, ID: 22026032

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 08:38AM PDT, ID: 22026675

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL DTS, MS SQL Server, SQL Server 2005
Sign Up Now!
Solution Provided By: ScottPletcher
Participating Experts: 3
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628