Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 result in 2 server

Author  Topic 

niranjankumark
Posting Yak Master

164 Posts

Posted - 2007-12-20 : 08:20:10
Hi,

i select same query in 2 server database.
ex : server1
select a,b from customer
result :
a b
---------
1 hi
1 hello
1 hi

same query executed in another server
ex : server 2
select a,b from customer
result :
a b
---------
1 hi
1 hi
1 hello

Is it possible to change in order ??? it reflects major impact on my server when i compare both server are in sync...
kindly reply soon

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-12-20 : 08:27:18
you need to specify the order of the records return using the ORDER BY clause.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2007-12-20 : 08:27:23
Use an order by. Without order by, the order the results are retrieved is not guaranteed.
Go to Top of Page

niranjankumark
Posting Yak Master

164 Posts

Posted - 2007-12-20 : 08:32:46
i am not mentioning the order by..
simply select statement with join
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-12-20 : 08:36:51
quote:
Originally posted by niranjankumark

i am not mentioning the order by..
simply select statement with join


You should !


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

niranjankumark
Posting Yak Master

164 Posts

Posted - 2007-12-20 : 08:43:08
ok fine ur point is valid .
But i wish to know will not be same in order ???
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-12-20 : 08:46:52
quote:
Originally posted by niranjankumark

ok fine ur point is valid .
But i wish to know will not be same in order ???




You might or might not get the same order. As Rick pointed out, without using ORDER BY the order of the result is not guaranteed.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -