Why does view return different results in Enterprise Manager than in adp?

E

emanning

I've got the following view (SQL 2005):

SELECT TOP (100) PERCENT dbo.MyTable.*
FROM dbo.MyTable
ORDER BY LEFT(Block, 5), CAST(SUBSTRING(Block, 6, 10) AS integer),
Block

This returns rows in the order that I want. Here's a sample:
<column1>, Block1, ...<column n>
<column1>, Block2, ...<column n>
....
<column1>, Block10,...<column n>

In the adp (originally developed in 2003, now using 2010) this view
returns these rows, which is not what I want:
<column1>, Block1, ...<column n>
<column1>, Block10, ...<column n>
<column1>, Block2, ...<column n>

I've got a column called "Block" that has these values: Block1,
Block2, .... Block10. I'm trying to sort the rows so that the order
is in the expected order, which is Block1, Block2...Block10.

Why the difference in rows returned between Enterprise Manager and the
adp? Is there some setting in the adp that I need to tweak?

Thanks for any help or advice.
....
 
A

a a r o n . k e m p f

Yes, you can re-arrange the columns to be in the order that you want,
and then hit the SAVE button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top