D
David W. Fenton
I'm working on an upsizing project and the existing Access app uses
this SQL (and works fine):
SELECT tblDonor.DonorID
FROM tblDonor
WHERE tblDonor.LNAME="Weingartner"
AND tblDonor.FNAME Like "Jason*"
AND tblDonor.DonorID<>219784
ORDER BY tblDonor.LNAME="Weingartner",
tblDonor.SXLName2="W84968",
tblDonor.FNAME="Jason S.",
tblDonor.DonorID
When I run this against the SQL Server back end, it chokes.
If I remove the ORDER BY, it runs fine, but I need the ORDER BY for
presentation.
Is there a TSQL method of ordering by the Boolean result of a
comparison?
Or will I have to do the sort some other way?
Experimenting with this I tried creating a disconnected recordset,
but couldn't find a way to apply an ORDER BY once I'd populated it.
Is that possible?
this SQL (and works fine):
SELECT tblDonor.DonorID
FROM tblDonor
WHERE tblDonor.LNAME="Weingartner"
AND tblDonor.FNAME Like "Jason*"
AND tblDonor.DonorID<>219784
ORDER BY tblDonor.LNAME="Weingartner",
tblDonor.SXLName2="W84968",
tblDonor.FNAME="Jason S.",
tblDonor.DonorID
When I run this against the SQL Server back end, it chokes.
If I remove the ORDER BY, it runs fine, but I need the ORDER BY for
presentation.
Is there a TSQL method of ordering by the Boolean result of a
comparison?
Or will I have to do the sort some other way?
Experimenting with this I tried creating a disconnected recordset,
but couldn't find a way to apply an ORDER BY once I'd populated it.
Is that possible?