473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
0 1500

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

Similar topics

8
by: Mike N. | last post by:
Hello: I am new to T-SQL programing, and relativly new to SQL statements in general, although I have a good understanding of database theory. I'm a little confused as to the fundamental...
2
by: caro | last post by:
Hi I am trying to write two Select * statements to the same text file using bcp (from a stored procedure). But cannot find a way of appending to a file using bcp. Does anyone know if this...
1
by: Bruce MacDonald | last post by:
I've got a question/request for the SQL gurus. I'm building a model of bandwidth demand in MS Access and want to get aggregated results for demand at each PCP in each time period. The two...
9
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my...
3
by: matthewemiclea | last post by:
I am trying to display information in Access on a form that takes information from many different queries and puts them together on a spreadsheet or chart. Some specific info: The information I...
2
by: deko | last post by:
Can I select from multiple tables/queries in a single SQL statement? For example: SELECT , , FROM qryThis, qryThat, tblOtherThing Does this work only with Jet, or does SQL just work like...
15
by: d4 | last post by:
I have a vbscript (below) I want to rewrite in C# but I cannot get it to work (unless there is a better way to do it). The script will combine 2 lines if the (next) line contains a "+",...
3
by: Hillary H | last post by:
I would like to take these two queries and combine them into one if possible. This is the first query: SELECT DISTINCT . INTO FROM INNER JOIN NOLDBA_OBLIGATION ON .=NOLDBA_OBLIGATION.ID_CASE...
46
by: dude88888 | last post by:
Hello I have one query where i get the total number of units for an entire fund say fund 89 has 1000 total units Then i need to find out how much of the total fund each user has say user...
6
by: veneeth | last post by:
I've a date and time format as mentioned below. I want to add +6:30 to it and then extract date and time into two different columns after adding the time. Sample data 2014-01-08 00:38:57.000...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.