C
Cyberwolf0000 via AccessMonster.com
I have a union SQL statement that is not pulling the data correctly. I am
using this SQL to fill an AtiveX listbox and want it sorted bty the
ScheduleTime field. Here is the SQL statement
SELECT PONumberID, CompanyName, format(ScheduleTime, 'hh:nn') AS STime FROM
qry_CompanySched WHERE ScheduleDate= #5/11/2009# ORDER BY format(ScheduleTime,
'hh:nn') UNION SELECT "" AS PONumberID, NewText AS CompanyName, "" AS STime
FROM tblNew;
As you can see it is a very straight forward statement and I would have
thought it would sort by the STime field. Is this not the case with a Union
statement?
TIA,
--
James B Gaylord
For the Wolf comes the strength of the Pack,
For the Pack comes the strength of the Wolf,
-R. Kipling
Office 2003 on Win XP SP2
using this SQL to fill an AtiveX listbox and want it sorted bty the
ScheduleTime field. Here is the SQL statement
SELECT PONumberID, CompanyName, format(ScheduleTime, 'hh:nn') AS STime FROM
qry_CompanySched WHERE ScheduleDate= #5/11/2009# ORDER BY format(ScheduleTime,
'hh:nn') UNION SELECT "" AS PONumberID, NewText AS CompanyName, "" AS STime
FROM tblNew;
As you can see it is a very straight forward statement and I would have
thought it would sort by the STime field. Is this not the case with a Union
statement?
TIA,
--
James B Gaylord
For the Wolf comes the strength of the Pack,
For the Pack comes the strength of the Wolf,
-R. Kipling
Office 2003 on Win XP SP2