By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 745 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

I have below 2 queries and I want to combine them together.

P: 59
I need some help writing a sql query. I have below 2 queries and I want to combine them together.

Now I already tried 'union' but it doesn't work.

I first want to print all results of query1 than at bottom of that I want to print all results for query2.

--Query#1
Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCT a.[rank], b.Description
  2.     FROM CONTAINSTABLE(myTable, *, '"ra*'") AS a
  3.         INNER JOIN myTable AS b ON a[key] = b.ID
  4.              ORDER BY a.rank desc;
-Query#2
Expand|Select|Wrap|Line Numbers
  1. SELECT DISTINCT a.[rank], b.Description
  2.     FROM FREETEXTTABLE(myTable, *, '"ra'") AS a
  3.         INNER JOIN myTable AS b ON a[key] = b.ID
  4.              ORDER BY a.rank desc;
Nov 9 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.