convert access qry to ansi 92 equivalent

  • Thread starter Thread starter drew
  • Start date Start date
D

drew

the following sql statement gives different results when
I run it from ado vs running it in design view:

SELECT DISTINCT
DOM_OAG.AIRLINE, DOM_OAG.LEAVE_AIRPORT,
DOM_OAG.ARRIVE_AIRPORT, DOM_OAG.EQUIPMENT,
DOM_OAG.FLIGHT_NUMBER, DOM_OAG.MONDAY, DOM_OAG.TUESDAY,
DOM_OAG.WEDNESDAY, DOM_OAG.THURSDAY, DOM_OAG.FRIDAY,
DOM_OAG.SATURDAY, DOM_OAG.SUNDAY, DOM_OAG.LEAVE_TIME,
DOM_OAG.ARRIVE_TIME, DOM_OAG.DAY_ADJ_AMOUNT INTO
Apr_Temp1 FROM DOM_OAG;

I get less records using ado. the Monday thru Sunday
fields and the day_adj field can contain null values.

how do i word this so it works in ado, the same way it
works in design view?

Thanks.
 
There's absolutely no reason why that query shouldn't work in ADO.

Are you sure you're running exactly the same query?
 
drew said:
the following sql statement gives different results when
I run it from ado vs running it in design view:

SELECT DISTINCT
DOM_OAG.AIRLINE, DOM_OAG.LEAVE_AIRPORT,
DOM_OAG.ARRIVE_AIRPORT, DOM_OAG.EQUIPMENT,
DOM_OAG.FLIGHT_NUMBER, DOM_OAG.MONDAY, DOM_OAG.TUESDAY,
DOM_OAG.WEDNESDAY, DOM_OAG.THURSDAY, DOM_OAG.FRIDAY,
DOM_OAG.SATURDAY, DOM_OAG.SUNDAY, DOM_OAG.LEAVE_TIME,
DOM_OAG.ARRIVE_TIME, DOM_OAG.DAY_ADJ_AMOUNT INTO
Apr_Temp1 FROM DOM_OAG;

I get less records using ado. the Monday thru Sunday
fields and the day_adj field can contain null values.

how do i word this so it works in ado, the same way it
works in design view?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is a Make-Table query. It is only available in Access (JET) dbs.
Are you sending it to another type of db when you use ADO?

How are you setting up the ADO call?

- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQFD3C4echKqOuFEgEQKM6QCfW52/wpFomHmxpXea1PgJx13dYcwAn1af
1/fiJXiIxQu9BowqZppeKQyV
=VbUe
-----END PGP SIGNATURE-----
 
yes im sure - i did a debug.print, and copied the result
into Sql View in the QBE, and still different results.

It must have something to do with the null values--I
replaced all the null values with zero, and ado produced
the same record set as I get from qbe - i think i can
work live with this, but if you have any comments, please
let me know as I am curious as ive spent the last 2 days
trying to debug this thing.

thanks for your response.
 
Back
Top