Wednesday, March 21, 2012
Loop Inside SP
anyone for help?
what's the syntax of for.next, do while loop in Stored Proc?
ur help is much appreciated!
thanks,while (<true_condition>) begin
...
end
there is no for equivalent in the engine (yet)|||FOR and NEXT are both keywords in MSSQL, but there is no FOR ... NEXT loop. If you want to do something from the first row to the last one in your RecordSet, you can use FETCH.sql
LOOKUPCUBE Problem!
Hi,
Dose LOOKUPCUBE function include "Customer Member" ?
I use Customer Member in LOOKUPCUBE syntax and system response #Err!
So, LOOKUPCUBE dosen't support Customer Member?
Thanks for any advice!
Angi
Hi Angi,
The LookupCube function returns either a numeric expression or a string expression. Assuming you have a Customer dimension with a hierarchy called Customers (with levels Country-State-City-Name), and you are issuing the query in cube Budget, but want to evaluate these expressions in another cube called Sales, here are two working examples:
with member x as 'lookupcube("Sales", "[Customers].[Country].&[Canada].name")'
select x on 0 from [Budget] -- returns the string Canada
with member x as 'lookupcube("Sales", "[Customers].[City].count")'
select x on 0 from [Budget] -- returns the number of cities in the City level
Hope this helps,
Artur
|||
Artur,
Thanks for help!
My expression as follow...
WITH
MEMBER [X].[XX02].[THISPERIOD] AS '[X].[XX02].[200612]'
MEMBER [IV].[IV02].[Execute] AS 'LOOKUPCUBE ("CUBEEF" , " (
[X].[XX08].&[XX0830010] , " + [X].[XX04].CURRENTMEMBER.UNIQUENAME + "," +
[X].[XX01].CURRENTMEMBER.UNIQUENAME + " , [X].[XX02].[THISPERIOD] )" ) '
....
....
So, the Customer Member is [X].[XX02].[THISPERIOD] and the
[IV].[IV02].[Execute] will response #Err.
Any idea?
Angi
|||
The second parameter in the LookupCube function call is invalid. To see the detailed error message, please double click on the Err# cell in SQL Management Studio and it will display the reason. Looks like you are trying to pass a set to the function and not a string. What are you trying to achieve with this query?
--Artur
Monday, February 20, 2012
Looking for expression example to force a column to Uppercase
I need to force a string column to uppercase. In Powerbuilder there is a
function upper(). Can you tell me the syntax to use in the expression editor
for RS. I can't seem to find an example in theReporting Services Help.
Thanks in advance!
--
JeanDim LowerCase, UpperCase As String
LowerCase = "Hello World 1234" ' String to convert.
UpperCase = UCase(LowerCase) ' Returns "HELLO WORLD 1234".
--
Jeff Lynch
"A BizTalk Enthusiast"
http://dotnetjunkies.com/WebLog/jlynch/
"jrak461" <jrak461@.discussions.microsoft.com> wrote in message
news:806D7B4F-274D-4A3D-93D4-F74B45B4579B@.microsoft.com...
> Hello,
> I need to force a string column to uppercase. In Powerbuilder there is a
> function upper(). Can you tell me the syntax to use in the expression
> editor
> for RS. I can't seem to find an example in theReporting Services Help.
> Thanks in advance!
> --
> Jean|||=Fields!YourField.Value.ToLower
or
=UCase(Fields!YourField.Value)
"jrak461" wrote:
> Hello,
> I need to force a string column to uppercase. In Powerbuilder there is a
> function upper(). Can you tell me the syntax to use in the expression editor
> for RS. I can't seem to find an example in theReporting Services Help.
> Thanks in advance!
> --
> Jean|||Fields!YourField.Value.ToUpper()
To see all the things you can do with strings, look up string methods in the
dotnet framework help.
=-Chris
"jrak461" <jrak461@.discussions.microsoft.com> wrote in message
news:806D7B4F-274D-4A3D-93D4-F74B45B4579B@.microsoft.com...
> Hello,
> I need to force a string column to uppercase. In Powerbuilder there is a
> function upper(). Can you tell me the syntax to use in the expression
editor
> for RS. I can't seem to find an example in theReporting Services Help.
> Thanks in advance!
> --
> Jean