Adding Row to query

  • Thread starter Thread starter Oded Kovach
  • Start date Start date
O

Oded Kovach

Hello there

I have query which provide me some data

I would like to add to it one fix row for any case

I've tried to use UNION to add it but it forse me to add it with table
(which i don't need in this case because i need to add fix row)

Can someone help me to know what should i do for use it?
 
Oded said:
I have query which provide me some data

I would like to add to it one fix row for any case

I've tried to use UNION to add it but it forse me to add it with table
(which i don't need in this case because i need to add fix row)


I use a simple table with one record of one field for this
kind of thing.

SELECT d1, f2 FROM sometable
UNION ALL
SELECT 0, " ALL" FROM OneRowTable
 
You have to include a table name in the FROM clause, but the columns do not
actually have to come from the table ...

SELECT TheText FROM TheTable
UNION SELECT "Hello World" FROM TheTable

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top