BusinessObjects Board

prompt for date

Hi all,
I have a condition like
in ((select case when @Select(File review\FR Status)=‘Draft’ then @Select(File review\FR Draft Date Year)
when @Select(File review\FR Status)=‘Finalized’ then @Select(File review\FR Finalized Year)
end)=@Prompt(‘2-File Review Year’,‘File review\FR Create Year’,))
or
(‘ALL’ in @Prompt(‘2-File Review Year’,‘File review\FR Create Year’,))

i converted every thing to char but it is throwing like

incorrect syntax near string

please help

Regards
Kumar.P


kumar446 :india: (BOB member since 2006-01-23)

Hi,
I see some problem in the code for @prompt, here you are not defining any data type for the prompt. it should be ‘A’, secnd thing when you try to get teh ‘ALL’ value then are your users going to enter ‘ALL’?

Is it a Universe based report?, did you parse the object? It should have given you the error.


Omkar Paranjpe :us: (BOB member since 2006-02-13)

This just looks strange to me. It looks like you’re trying to have SQL produce logic that SQL just can’t do.

I’m confused by the Select portion.

What would the stuff after “in” produce?


Steve Krandel :us: (BOB member since 2002-06-25)

Hi,
Here is the modified code

Yes i added the A to prompt.but it is throwing error incorrect syntax near string value

Regards
Kumar


kumar446 :india: (BOB member since 2006-01-23)

Please post the actual SQL code (without the @Select() functions) in order to get some help. Is this a condition object made in Designer? If so, this topic should be moved to the Semantic Layer forum.


Dave Rathbun :us: (BOB member since 2002-06-06)

Usually the best way to approach a problem like this is to start simple (KISS methodology) and then slowly enhance your code. Don’t want too much all at once :lol:

HenkK


HenkK :netherlands: (BOB member since 2004-03-02)

Hi,
The code is

(
 (select case 
   when ( dbo.UQA_FL_REVW.STS )= 'Draft' 
      then cast((datepart(yy,dbo.UQA_FL_REVW.REVW_DRFT_DT) ) as char)
   when  ( dbo.UQA_FL_REVW.STS )= 'Finalized' 
      then cast(( datepart(yy,dbo.UQA_FL_REVW.FNL_DT) ) as char)
end)  
= ( @Prompt('2-File Review Year','A','File review\FR Create  Year',,))
or 
('ALL' in ( @Prompt('2-File Review Year','A','File review\FR Create  Year',,))

Thanks
Kumar


kumar446 :india: (BOB member since 2006-01-23)

Remove the word “select” from your condition object.


Dave Rathbun :us: (BOB member since 2002-06-06)

Please do not cross post! See https://bobj-board.org/t/94705/13

HenkK


HenkK :netherlands: (BOB member since 2004-03-02)

Hi Dave,
I removed the select still i am getting error .Incorrect syntax near string value


kumar446 :india: (BOB member since 2006-01-23)

Check your parenthesis, it seems they are not balanced.

 
('ALL' in ( @Prompt('2-File Review Year','A','File review\FR Create  Year',,))

There are 3 opens and 2 closes in that part of the code…

Moving to the Universe Designer aka Semantic Layer forum for further posts.


Dave Rathbun :us: (BOB member since 2002-06-06)

I looked at that topic last night, but they are not the same. Similar, but not the same. This one is for year, the other is for month.


Dave Rathbun :us: (BOB member since 2002-06-06)