[thelist] ASP.NET: UNION query not returning expected results

Joel D Canfield joel at streamliine.com
Thu Sep 27 15:27:43 CDT 2007


> i think the UNION that you wrote is awfully convoluted for what it's 
> supposed to return, and should be simplified

hey, we're all surprised by *that*, aren't we?

any pointers or suggestions (or complete copy-and-paste magic solutions)
?

I haven't a clue for some reason how to write the select/union more
simply.

Just to be sure we're thinking in the same place (sort of)

    Employees table has (among others) fields named id and officeid
    Offices has id and number

I need a list of office ids and numbers where Employees.id is (my
current querystring value) and Offices.id doesn't appear in
Employees.officeid

Eh?



More information about the thelist mailing list