Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Union and order by and primary key w/identity
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Union and order by and primary key w/identity
Miscellaneous
Thread ID:
00539167
Message ID:
00539167
Views:
46
id field is primary key w/1 increment identity on that field as well.

I can do:
select * from trnhead where shipped=0 order by id
fine.

but:
select * from trnhead where shipped=0 order by id
union all
select * from ordhead where shipped=0 order by id
won't work with the order bys in there.

I just took the order bys out since the ordering is okay it seems without, but:

Does anyone know why?
Next
Reply
Map
View

Click here to load this message in the networking platform