on 03-26-2013 10:14 AM
Hi Experts,
I need to concatenate several properties of a dimension to store a value.
I'm in 7.0 SP06 MS, and I'm trying to do something like this:
* WHEN Dimension1
* IS ID1
* REC (Dimension1 = ID2, Dimension2 = Dimension2.Property1 + _ + Dimension2.Property2 + _ + Dimension2.Property3)
* ENDWHEN
The Dimension 1 and Dimension2 are in scope, but when make concatenation only retrieves me the Property1 value, the other properties write them as literal.
Any idea is appreciated
Thanks
Ignacio
Hi Ignacio,
have you tried putting double quotes around _, i.e.
... + "_" + ...?
Kind regards
Roberto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Roberto,
Yes I tried double quotes and the result is:
gst001"_"Dimension2.Property2"_"Dimension2.Property3
Without double quotes (Dimension2.Property1 + _ + Dimension2.Property2 + _ + Dimension2.Property3😞
gst001_Dimension2.Property2_Dimension2.Property3
If I try Dimension2.Property1 + Dimension2.Property2:
gst001Dimendion2.Property2
The first property retrieves me the Property1 value, but the other properties write then as literal
Thanks
Ignacio
Hi Ignacio,
try using *SELECT, something like this
*SELECT(%VAR1%,Property1,"Dimension2","Property1 = '<value of property1>'")
*SELECT(%VAR2%,Property2,"Dimension2","Property2 = '<value of property2>'")
*SELECT(%VAR3%...
*For %V1%=%VAR1%
* REC (Dimension1 = ID2, Dimension2=%V1% + _ + %VAR2% + _ + %VAR3%)
*Next
Kind regards
Roberto
Hi Roberto,
How can I put the <value of property1> dinamicaly in the *SELECT
If I try:
*WHEN Dimension2
*IS *
*SELECT(%VAR1%,Property1,"Dimension2","[ID] = 'Dimension2.ID'")
*FOR %VAR1%=%V1%
....
*NEXT
ENDWHEN
In debugger it's send me something like:
No records returned by
*SELECT(%VAR1%,Property1,"Dimension2","[ID] = 'Dimension2.ID'")
Dimension2.ID it's a literal it's not converted to the property value
Thanks Roberto
Hi Roberto,
Dimension
ID GR_ST CP_BS
M1 GR_01 01
M2 GR_01 02
M3 GR_02 01
GR_01_01 X X
GR_01_02 X X
GR_02_01 X X
I want put the value of M1 into GR_01_01, M2 into GR_01_02, M3 into GR_02_01 (Property GR_ST + _ + CP_BS)
*WHEN Marca
*IS *
*SELECT(%VAR1%,GR_ST,"Marca","ID = 'Marca.ID'")
*SELECT(%VAR2%,CP_BS,"Marca","ID = 'Marca.ID'")
*FOR %V1%=%VAR1%
*REC (Mercado = MKT_999, Marca=%V1%_%VAR2%)
*NEXT
*ENDWHEN
In *SELECT statement I can't put the value, i need put it dinamicaly.
Thanks
Hi Roberto,
I solve my problem with this code:
*SELECT(%CP_BS1%,CP_BS,MARCA,[CP_BS]<>'' GROUP BY [CP_BS])
*FOR %CB%=%CP_BS1%
*WHEN Marca.CP_BS
*IS %CB%
*REC (Marca=Marca.GR_ST + _ + %CB%)
*ENDWHEN
*NEXT
But if can explain me how can I implement **SELECT statement in my script code, i try implement it.
Thanks
User | Count |
---|---|
15 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.