Solved

Adding a "pseudo record" to a view.

Posted on 2011-03-02
2
326 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

828 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