Query yields diff results on diff plats

  • Thread starter Thread starter Ashish Nanda
  • Start date Start date
A

Ashish Nanda

I have a query and when i use this it gives me results

SELECT LEADMAN_LEADS.CUSTOMER, Date()-[DATE_AVAIL] AS
[tIME], LEADMAN_LEADS.SMAN
FROM LEADMAN_LEADS
WHERE (((Date()-[DATE_AVAIL])>'11') AND
((LEADMAN_LEADS.SMAN) Is Null));



showing 12 records where as when i run this query going to
SQL Backend then it gives me differnet results what cud be
the reason.
Is the date format diffenrent in them and that is whay or
what..?
Ashish Nanda
 
In Access I'm surprised that you don't get an error message about mis-matched
types if you are using an mdb (and Jet). Remove the apostrophes from around the
11 and see if you get the expected result or at least the same results as in the
SQL backend.

SELECT LEADMAN_LEADS.CUSTOMER, Date()-[DATE_AVAIL] AS
[TIME], LEADMAN_LEADS.SMAN
FROM LEADMAN_LEADS
WHERE (((Date()-[DATE_AVAIL])>11) AND
((LEADMAN_LEADS.SMAN) Is Null));
 
I actualy did try that but When i remove the apostrophes
it gives me an error about mismatched types.
What is the solution for it?
Best Regards,
Ashish Nanda



-----Original Message-----
In Access I'm surprised that you don't get an error message about mis-matched
types if you are using an mdb (and Jet). Remove the apostrophes from around the
11 and see if you get the expected result or at least the same results as in the
SQL backend.

SELECT LEADMAN_LEADS.CUSTOMER, Date()-[DATE_AVAIL] AS
[TIME], LEADMAN_LEADS.SMAN
FROM LEADMAN_LEADS
WHERE (((Date()-[DATE_AVAIL])>11) AND
((LEADMAN_LEADS.SMAN) Is Null));

Ashish said:
I have a query and when i use this it gives me results

SELECT LEADMAN_LEADS.CUSTOMER, Date()-[DATE_AVAIL] AS
[tIME], LEADMAN_LEADS.SMAN
FROM LEADMAN_LEADS
WHERE (((Date()-[DATE_AVAIL])>'11') AND
((LEADMAN_LEADS.SMAN) Is Null));

showing 12 records where as when i run this query going to
SQL Backend then it gives me differnet results what cud be
the reason.
Is the date format diffenrent in them and that is whay or
what..?
Ashish Nanda
.
 
I'm stuck. Are you using JET or MSDE for the data in Access?

Ashish said:
I actualy did try that but When i remove the apostrophes
it gives me an error about mismatched types.
What is the solution for it?
Best Regards,
Ashish Nanda
-----Original Message-----
In Access I'm surprised that you don't get an error message about mis-matched
types if you are using an mdb (and Jet). Remove the apostrophes from around the
11 and see if you get the expected result or at least the same results as in the
SQL backend.

SELECT LEADMAN_LEADS.CUSTOMER, Date()-[DATE_AVAIL] AS
[TIME], LEADMAN_LEADS.SMAN
FROM LEADMAN_LEADS
WHERE (((Date()-[DATE_AVAIL])>11) AND
((LEADMAN_LEADS.SMAN) Is Null));

Ashish said:
I have a query and when i use this it gives me results

SELECT LEADMAN_LEADS.CUSTOMER, Date()-[DATE_AVAIL] AS
[tIME], LEADMAN_LEADS.SMAN
FROM LEADMAN_LEADS
WHERE (((Date()-[DATE_AVAIL])>'11') AND
((LEADMAN_LEADS.SMAN) Is Null));

showing 12 records where as when i run this query going to
SQL Backend then it gives me differnet results what cud be
the reason.
Is the date format diffenrent in them and that is whay or
what..?
Ashish Nanda
.
 
Back
Top