Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

LOOKUP Dimension in FDMEE

N000SJan 3 2018 — edited Jan 8 2018

Hi,

I have one general question regarding the lookup(Target Dimension Class) in FDMEE

if I have got a look up dimension in the target application, am I supposed to get the member columns for the lookup dimension in the .DAT file(which get created in the outbox folder)

For example:

I have a custom dimension which look up the values from UD9 column of OPEN_INTERFACE table.

CUSTOM5 = LOOKUP(UD9)

Thanks.

Comments

John Thorton

Gayathri Venugopal wrote:

DayEnd
Reorder
SalesDayInventory
Quantity
DayStart
390392564
6454106575
756510818

Above is the output of the expected data. From the second row of DayEnd, I need to take the value of the previous row of the DayStart.How do I do that.If you observe the values of DayEnd, it would have the data of the previous row value of the DayStart.

Please click on URL below & provide details as stated in #5 - #9 inclusive

How do I ask a question on the forums?

We don't have your table.

We don't have your data.

We don't have your requirements.

Manik

Question unclear... are you looking for LEAD LAG functions of oracle?

Cheers,

Manik.

Peter Boekelaar

There...

with test_data as
( select 0 reorder, 39 sales_day_inventory, 25 quantity, 64 day_start from dual union
  select 54,10,65,75 from dual union
  select 65,10,8,18 from dual)

select lag(day_start) over (order by reorder) day_end
   , reorder
   , sales_day_inventory
   , quantity
   , day_start
  from test_data

Gayathri Venugopal

Hi i am using mysql server version 8 I am getting an error like this: Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(order by ShippedDate) DayEnd    , reorder    , sales_day_inventory    , quantity' at line 1 0.000 sec

Peter Boekelaar

Uhmmm... you posted this question without any context in a forum for Oracle. Did you expect the same syntax?

Please post your question on a MySQL forum

John Thorton

duplicate thread

Please don't post MYSQL issues in Oracle forum

Gaz in Oz

In Oracle database it would look like this, for example:

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/LAG.html

with x as (

   select  0 reorder, 39 sales_day_inventory, 25 quantity, 64 day_start from dual union all

   select 54,         10,                     65,          75           from dual union all

   select 65,         10,                      8,          18           from dual

)

select lag(day_start, 1, sales_day_inventory) over (order by reorder) day_end,

       reorder,

       sales_day_inventory,

       quantity,

       day_start

from   x;

   DAY_END    REORDER SALES_DAY_INVENTORY   QUANTITY  DAY_START

---------- ---------- ------------------- ---------- ----------

        39          0                  39         25         64

        64         54                  10         65         75

        75         65                  10          8         18

3 rows selected.

SQL>

In mysql 8 and above it would look like this:

https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html#function_lag

with x as (

   select  0 reorder, 39 sales_day_inventory, 25 quantity, 64 day_start from dual union all

   select 54,         10,                     65,          75           from dual union all

   select 65,         10,                      8,          18           from dual

)

select lag(day_start, 1, sales_day_inventory) over w day_end,

       reorder,

       sales_day_inventory,

       quantity,

       day_start

from   x

window w as (order by reorder);

As usual it is all laid out in the respective documentation.

LAG() function in mysql did not exist till version 8.

1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 5 2018
Added on Jan 3 2018
3 comments
584 views