Solved

Adding a "pseudo record" to a view.

Posted on 2011-03-02
2
319 Views
Last Modified: 2012-08-13
I have a view, something like:

SELECT DISTINCT Salesman FROM SalesReport

This gives me the proper list.  However, I need to add one record that does not exist in the SalesReport table, that is "--ALL--"  (It's for an issue with Crystal Reports, if you really need to know)

Can I do this?  How?
0
Comment
Question by:Clif
2 Comments
 
LVL 32

Accepted Solution

by:
ewangoya earned 500 total points
ID: 35017914

SELECT DISTINCT Salesman FROM SalesReport
union all
SELECT '--ALL--'
0
 
LVL 10

Author Closing Comment

by:Clif
ID: 35017986
Ever have one of those days when the obvious escapes you?

Thanks for jarring my memory.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Server 2012 r2 - Make Temp Table Query Faster 5 40
Sql server insert 13 26
create an aggregate function 9 31
Teradata converting character to integer 2 12
Read about achieving the basic levels of HRIS security in the workplace.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now