Showing posts with label operator. Show all posts
Showing posts with label operator. Show all posts

Sunday, March 11, 2012

[Reports builder] operator * in a prompt list

Hi all, when i create a reports deploy on the Report server, i usually choose a filter prompted on Run. The lsit containt for example the list of my customers, but the list in empty like i want (like that, user can put a list from excel by copy-paste). But ... , if the want all the customers, what is the " * " operator to select all my records ?

Thanks for help

Erwan, France

Do you mean

In a drop down for a report parameter you want <all> to appear?

Saturday, February 11, 2012

@NumericVal IS NOT NULL seems not to return a boolean.

I'm trying to ensure that only of the parameters is passed to my stored procedure.

BOL says that the IS [NOT] NULL operator (language construct?) will return a boolean. An IF statement takes an expression which results in a boolean so I was surprised to find that the below code doesn't parse.

CREATE PROC sp_OneParm(
@.NumericVal float = null,
@.StringVal nvarchar(200) = null,
@.DateVal datetime = null,
@.BitVal bit = null)
AS
DECLARE @.ValCount tinyint
SET @.ValCount = 0

-- Ensure we've only got one update value specified
IF @.NumericVal IS NOT NULL @.ValCount = @.ValCount + 1
IF @.StringVal IS NOT NULL @.ValCount = @.ValCount + 1
IF @.DateVal IS NOT NULL @.ValCount = @.ValCount + 1
IF @.BitVal IS NOT NULL @.ValCount = @.ValCount + 1
IF @.ValCount > 1 RAISERROR ('Only one @.*Val paramater may be specified when calling sp_OneParm()', 16, 1)

-- Other Stuff
GO

Am I missing something simple or do I need to restructure my code to achieve the logic I want?Sure :)

IF @.NumericVal IS NOT NULL SET @.ValCount = @.ValCount + 1|||Bugger. :o
Thank-you roac.