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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • game2d
    New Member
    • Apr 2013
    • 59

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

    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
    Code:
    SELECT DISTINCT a.[rank], b.Description
        FROM CONTAINSTABLE(myTable, *, '"ra*'") AS a
            INNER JOIN myTable AS b ON a[key] = b.ID
                 ORDER BY a.rank desc;
    -Query#2
    Code:
    SELECT DISTINCT a.[rank], b.Description
        FROM FREETEXTTABLE(myTable, *, '"ra'") AS a
            INNER JOIN myTable AS b ON a[key] = b.ID
                 ORDER BY a.rank desc;
Working...