Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
9
Answers
union all with order by newid()???
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
divya
11y
1.7k
1
Reply
Hai friends,
here im getting error when im using union all and order by newid() together, can any one help me to solve this issue..
select distinct * from(select top 500 (A.AdId),A.AdImgPath,A.OnAdURL,A.AdSize from KZ_AdDetails A,KZ_Add_Cat Cat,KZ_Add_City Cit where A.AddU_ID=Cat.AddU_ID and A.AddU_ID=Cit.AddU_ID and AdSize='250x250' order by newid()) X
union all
select distinct * from(select top 500 (A.AdId),A.AdImgPath,A.OnAdURL,A.AdSize from KZ_AdDetails A,KZ_Add_Cat Cat,KZ_Add_District Dis where A.AddU_ID=Cat.AddU_ID and A.AddU_ID=Dis.AddU_ID and AdSize='250x250' order by newid()) Y
regards
Divya
Post
Reset
Cancel
Answers (
9
)
Next Recommended Forum
Check , Default, in SQL Server
Error Connecting Sql Server