Showing posts with label remember. Show all posts
Showing posts with label remember. Show all posts

Monday, March 19, 2012

Dummy Where Clause Allowing Dummy Select Of Data - Utilizing Where value = 1

Years ago, I remember while doing maintenance on a stored procedure seeing a 'Select x, y, z Where 'some value' = 1.

The function of this, I believe was to make the select work but not retrieve any actual values.

I am attempting to use this in an 'Insert Into Select values From' statement. This insert uses multiple selects via unions and I need a final dummy Select statement with no Where criteria.

What I am thinking may not even apply to what I need to do here.

If you recognize something even remotely near what I am trying to get across I would appreciate your sending me the code.

Another solution for me is just inserting one row with a final RecId = 6 and ' ' or 0 values for the other fields into a table

but I was hoping this would work.

Example:

Insert Into table

Select

1 as RecId,

' ' as field1,

field2

From test1

Where field2 = 'CA'

Union

Select

2 as RecId,

' ' as field1,

field2

From test1

Where field2 = 'NJ'

Union

/*Final Select */

Select

6 as RecId,

' ' as field1,

field2

From test1

Where 'some value' = 1'

Thanks much for your assistance!!!

TADEG

If you want to create a dummy select that never returns rows, just add WHERE 0=1 to the end.

Code Snippet

SELECT x,y,x FROM Table WHERE 0=1

Wednesday, March 7, 2012

Dual axes in RS2k5

I seem to remember reading that in Reporting Services 2005 it would be
possible to create column charts with dual axes, in particular with a dual y
axis.
I've been playing around with the charts but I can't seem to find a way to
do this. Did this functionality find its way into the product in the end? How
is it done?
Thanks,
Matt.Hi Matt,
Welcome to use MSDN Managed Newsgroup!
From your descriptions, I understood would like to know whether Dual axes
will be supported in SQL Server 2005 Reporting Services. If I have
misunderstood your concern, please feel free to point it out.
Unfortunately, dual axes are not supported in the built-in charting
included with SQL Server 2005 RS. However, Dundas (see
http://www.dundasreporting.com/home/index.aspx) will be providing a plug-in
that supports this functionality.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.