Need help on exact SIDs generation in different SID tables (S,Q & Y tables)

I have a scenario like..
Matgroup is a time-dependent attribute to Material. MatGroup is included in material dimension of cube C01. Cube C01 is loading with transactional data, which has both fields, Material and MatGroup, with the option of generate master date.
As a result..
Material SID table (S table) - Get Updated
MatGroup SID table (S table) - Get Updated
Now the question is whether material master tables (Q & Y tables) contains the new Material - MatGroup relationships with their validity time interval or not. i.e. are attributes of master data tables (Q & Y tables) updated?
Actually my requirement is I need to add the new time-dependent attribute to a characteristic, and I want it to be populated while transactional data loading into cube. Would to be possible? Please give the solution if it is possible.

I am a bit confused. this also works without numbers in the C3 column.
drop table tablea;
drop table tableb;
create table tablea as
(select 1 C1,'B' C2, 'descA' C3 from dual union
select 1, 'B', 'descB' from dual union
select 2, 'x', 'descC' from dual union
select 3, 'y', 'descC' from dual
create table tableb as
(select 1 C1,'B' C2, 'descC' C3 from dual union
select 2, 'x', 'descB' from dual union
select 3, 'y', 'descC' from dual
merge into tableb t1
using (
           select tablea.C1, tablea.C2, max(tablea.C3) C3
           from tablea, tableb
           where tablea.c1 = tableb.c1
           and     tablea.c2 = tableb.c2
           and     tablea.c3 != tableb.c3
           group by tablea.C1, tablea.C2) t2
  on (t1.C1 = t2.C1 and t1.C2 = t2.C2 )
when matched  then
update
set T1.C3 = t2.C3;
select * from tableb;
C1     C2     C3
1     B     descB
2     x     descC
3     y     descC

Similar Messages

  • Need help in writing a select query to pull required data from 3 tables.

    Hi,
    I have three tables EmpIDs,EmpRoles and LatestRoles. I need to write a select Query to get roles of all employees present in EmpIDs table by referring EmpRoles and LatestRoles.
    The condition is first look into table EmpRoles and if it has more than one entry for a particular Employee ID than only need to get the Role from LatestRoles other wise consider
    the role from EmpRoles .
    Sample Script:
    Create Table #EmpIDs
    (EmplID int )
    Create Table #EmpRoles
    (EMPID int,Designation varchar(50))
    Create Table #LatestRoles
    EmpID int,
    Designation varchar(50)
    Insert into #EmpIDs values (1),(2),(3)
    Insert into #EmpRoles values (1,'Role1'),(2,'Role1'),(2,'Role2'),(3,'Role1')
    Insert into #LatestRoles values (2,'Role2')
    Employee ID 2 is having two roles defined in EmpRoles so for EmpID 2 need to fetch Role from LatestRoles table and for
    remaining ID's need to fetch from EmpRoles .
    My Final Output of select query should be like below.
    EmpID Role
    1 Role1
    2 Role2
    3 Role1
    Please help.
    Mohan

    Mohan,
    Can you check if this answers your requirement:
    Create Table #EmpIDs
    (EmplID int )
    Create Table #EmpRoles
    (EMPID int,Designation varchar(50))
    Create Table #LatestRoles
    EmpID int,
    Designation varchar(50)
    Insert into #EmpIDs values (1)
    Insert into #EmpIDs values (2)
    Insert into #EmpIDs values (3)
    Insert into #EmpRoles values (1,'Role1')
    Insert into #EmpRoles values (2,'Role2')
    Insert into #EmpRoles values (2,'Role1')
    Insert into #EmpRoles values (3,'Role1')
    Insert into #LatestRoles values (2,'Role2')
    --Method 1
    select e.EmplID,MIN(ISNULL(l.Designation,r.Designation)) as Designation
    from #empids e
    left join #emproles r on e.emplID=r.EmpID
    left join #latestRoles l on e.emplID=l.EmpID
    group by e.EmplID
    --Method 2
    ;with cte
    as
    select distinct e.EmplID,r.Designation,count(*) over(partition by e.emplID) cnt
    from #empids e
    left join #emproles r on e.emplID=r.EmpID
    select emplID,Designation
    from cte
    where cnt=1
    UNION ALL
    select a.EmplID,l.Designation
    from
    (select distinct EmplID from cte where cnt>1) a
    join #Latestroles l on a.EmplID=l.EmpID
    order by emplID
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Dad needs help with setting up shuffle on different account

    Hi all ..I have a daughter with a Ipod video, and a wife with a Ipod shuffle. How can I make them work with different itune libarys on the same computor? The ipod video side is all set up. I need to get the shuffle up and running. I opened another user account on our computor, got a library opened, downloaded a cd plugged in the shuffle....won't load. I need a simle way to do this, cause I'm a simple kinda dad. I'm all messed up..open for ANY idea
    gateway   Windows XP  

    sounds like its on manual update. next time you plug it in, open itunes and open preferences. there are a couple check boxes that say something like disk mode, open itunes when you plug in ipod, i don't remember the others, my ipods in the car. but they should be pretty self explanatory. or, when you plug it in, try dragging a song over into the ipod.

  • I need help with a 4th generation nano.

    I have a 4th generation iPod nano and this morning it just wouldn't turn on! I've tried resetting it and I've tried plugging it into the computer and a dock but it is completely unresponsive. (The hold button is definitely off). Does anyone have any suggestions as to what I could do?

    Follow this article.....   http://www.apple.com/support/ipod/five_rs/nano4gen/
    If this doesn't help then the ipod needs serviced.

  • Need Help with this PDF generation

    Greetings,
    Our company had a subcontractor (that is no longer
    available) create a small system for a client that allows the
    client to input some text in a flash form, and the system places
    the text at a certain spot on a previosly created PDF document. For
    80% of the users, this works perfectly and then can print and save
    the customized pdf document. For 20% of users, they can see and
    print the customized pdf, but when they save it, there is no
    customization (area is blank). Can anyone help us understand why
    this happens, and how to fix?
    HERE ARE DIRECT NOTES FROM OUR CLIENT:
    Users are able to input their customized info.
    The customized info shows up in the PDF on the brochure.
    Users can print the brochure with the customized info.
    Users can save the BLANK PDF (without their info)
    Users can NOT save the PDF with their info in it.
    The exact message is in the top of the window with the PDF
    brochure and says "please fill out the following form. You can not
    save data typed into this form. Please print your completed form if
    you would like a copy for your records."
    Here is the input
    form, feel free to test.
    When you input into the brochure1.cfm Form, it sends the data
    to
    http://www.caduceuswebs.net/brochure1output.cfm
    , which then spanwns the customized pdf to open.
    If you want to see the native pdf, it is here:
    CLICK
    HERE
    HERE IS THE CODE FOR BROCHURE1.CFM
    <CFFORM ACTION="brochure1output.cfm" METHOD="POST"
    ENABLECAB="YES" format="flash" width="470" height="550">
    <div align="center">
    <table width="470" border="0" align="center"
    cellpadding="0" cellspacing="0" bordercolor="#990066">
    <tr>
    <td><cfinput type="TEXT" name="name" id="name"
    label="Name" maxlength="60"></td>
    </tr>
    <tr>
    <td><CFINPUT TYPE="TEXT" NAME="address1"
    id="address1" label="Address" hspace="470">
    </P></td>
    </tr>
    <tr>
    <td><CFinput type="text" name="address2"
    id="address2" label="Address Cont." /></td>
    </tr>
    <tr>
    <td><CFinput type="text" name="state" id="state"
    label="City / State"/></td>
    </tr>
    <tr>
    <td><CFinput type="text" name="zip" id="zip"
    label="Zip Code"/></td>
    </tr>
    <tr>
    <td><CFinput type="text" name="phone" id="phone"
    label="Phone Number"/></td>
    </tr>
    <tr>
    <td><table width="470" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td width="100"><img src="img/transparent.gif"
    width="100" height="1" border="0" /></td>
    <td width="373"><cfinput type="SUBMIT"
    value="Generate Customized Brochure 1" name="Submit"></td>
    </tr>
    </table></td>
    </tr>
    </table>
    </div>
    </CFFORM>
    HERE IS THE CODE FOR BROCHURE1OUTPUT.CFM:
    <CFOUTPUT><CFSET
    date="#DateFormat(now())#"></CFOUTPUT>
    <CFSETTING ENABLECFOUTPUTONLY="YES"
    SHOWDEBUGOUTPUT="NO">
    <CFCONTENT TYPE="APPLICATION/vnd.fdf">
    <CFOUTPUT>%FDF-1.2
    1 0 obj <<
    /FDF <<
    /Fields
    <<
    /T(name)
    /V(#form.name#)
    >>
    <<
    /T(address1)
    /V(#form.address1#)
    >>
    <<
    /T(address2)
    /V(#form.address2#)
    >>
    <<
    /T(state)
    /V(#form.state#)
    >>
    <<
    /T(zip)
    /V(#form.zip#)
    >>
    <<
    /T(phone)
    /V(#form.phone#)
    >>
    /F(
    http://www.caduceuswebs.net/pdfs/brochure1.pdf)
    >>
    >>
    endobj
    trailer
    <</Root 1 0 R>>
    %%EOF
    </CFOUTPUT>

    rogers42 wrote:
    Hi,
    Thanks for the suggestion.
    While getting rid of the ";" helps, but the output of the select statement is not displayed?When you do a SELECT statement in PL/SQL, you have to select the results into variables or arrays.
    Try something like this:
    DECLARE
         CURSOR C1 IS
                       SELECT  TABLE_NAME
                FROM    DB_MGMT.CTRL_TAB_RETENTION
                WHERE   RETENTION_PERIOD_IN_MONTHS = 11
                AND     rownum                  < 2;
         min_dt_skey    NUMBER;
         max_dt_skey    NUMBER;
         stmt            VARCHAR2 (100);
    BEGIN
        FOR i IN C1
         LOOP
            -- dbms_output.put_line('Table Name: ' || i.TABLE_NAME);
            stmt :='SELECT min(DT_SKEY), max(DT_SKEY) FROM DWH_RSRC_PERF.' || i.TABLE_NAME;
            dbms_output.put_line(stmt);
            EXECUTE IMMEDIATE stmt
             INTO min_dt_skey, max_dt_skey;
         dbms_output.put_line (  min_dt_skey   || ' = MIN (dt_skey), '
                        || max_dt_skey   || ' = MAX (dt_skey) for table '
                        || i.table_name
        END LOOP;
    END;

  • Need help on smartform spool generation for payslips

    Hi Experts,
    My development of Payslip form is done, its all fine.
    Here is some clarification I need on the spool generation:
    First time I run the program for 2 employees, I get 2 pages one for each employee, as expected.
    When I again run the program for 2 employees, 2 pages are added to the same spool request.
    My requirement is to create a new spool when the program is executed for the next time. I have tried setting NO_OPEN and NO_CLOSE in control parameters and also I have tried with several output option settings. I have also tried using FMs SSF_OPEN and SSF_CLOSE. But no luck so far.
    Please note that this is HR Payslip hence the smartform is being called inside the GET PERNR loop.
    Thanks in advance.

    Hi,
    Here you can find the list of preconditions in order for Spool system to append to existing spool. Setting TDNEWID suggested by Nick will work and is the best solution if you wish to have each document in own spool. If you wish to have spool per job, you'd have to ensure that just the first document is output with TDNEWID set. You can also ensure spool separation by outputing the last document of the job by setting TDFINAL print parameter. Or you can ensure that spools will always be assigned a unique Title...
    cheers
    Janis

  • I need help to remove the margins on the sides of web pages.

    When I pull up any site, the text and images are all centered in the screen, with a solid inch or more of blank space on each side. I HATE IT! Can someone help me fix it? Thank you!

    1366 x 768 Pixels is where I am. I am having the same issue with every website, including this one. The edge of my avatar (which should be on the far left) is about 1.5" from the left edge. The edge of where it says "subscribe to this page's feed", etc, is about 1.5" from the rt side. It only started when I downloaded Firefox. If I open something using Explorer, it displays just fine. The page is from rt edge to left edge. I can open Yahoo in both browsers and the Firefox side looks like a little sheet of paper laying in the middle of the screen with blank space on either side. Thank you so much for trying to help me!

  • Need help with ipod second generation (please)

    i just came across my ipod second generation... the real second generation, circa 2002 (approximately).  i can't find the cable.  kicking myself!  is there any way to get a cable, and subsequently, move my old school tunes onto my imac or ibook?

    You can purchase the necessary cable from here: http://www.powerbookmedic.com/iPod-Firewire-Cable-p-16912.html
    As for moving your iPod's data/content back to iTunes, see this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • I need help updating my 3rd generation itouch to 4.2

    So, I'm trying to update my itouch 3rd gen to 4.2 because its currently still at 3.1.3. I'm getting very frustrated because I will start the update, and each time it starts to backup my info, it will run very quickly for a minute, and then slow to a crawl and then a stop. I dont need it to backup. I have backed up my itouch multiple times already. and then occasionally it will actually download the software quickly, but wont install because it keeps trying to backup again. Can someone please help? I need a certain app but cant get it unless i have updated to 4.0. And I have also updated Itunes, to so im pretty sure that's not the problem. HELP PLEASE.

    If your computer is running Windows, try temporarily disabling any antivirus and antispyware utility your system is running. Those can often cause this sort of problem.
    Regards.

  • Need help with dynamic code generation

    Hi Folks,
    I am trying to dynamically create and execute the following query
    Environment: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    DECLARE
    A NUMBER;
    stmt VARCHAR2(200);
         4
         5  CURSOR C1 IS
         6  SELECT TABLE_NAME
         7  FROM DB_MGMT.CTRL_TAB_RETENTION
         8  WHERE RETENTION_PERIOD_IN_MONTHS = 11
         9  AND rownum < 2;
        10
        11  BEGIN
        12  FOR i IN C1
        13  LOOP
        14
        15  -- dbms_output.put_line('Table Name: ' || i.TABLE_NAME);
        16
        17  -- dbms_output.put_line('SELECT min(DT_SKEY), max(DT_SKEY) FROM '||i.TABLE_NAME||' ;');
        18
        19  stmt :='SELECT min(DT_SKEY), max(DT_SKEY) FROM DWH_RSRC_PERF.'||i.TABLE_NAME||';';
        20
        21  dbms_output.put_line(stmt);
        22
        23  execute immediate stmt;
        24  END LOOP;
        25  END;
        26  /I get the following error message
    SQL> @sanity_check
    SELECT min(DT_SKEY), max(DT_SKEY) FROM DWH_RSRC_PERF.FACT_NOK_CELL_SERVICE2_HH;
    DECLARE
    ERROR at line 1:
    ORA-00911: invalid character
    ORA-06512: at line 23Can anybody spot any obvious syntax errors in the above code?
    Thanks in advance
    rogers42

    rogers42 wrote:
    Hi,
    Thanks for the suggestion.
    While getting rid of the ";" helps, but the output of the select statement is not displayed?When you do a SELECT statement in PL/SQL, you have to select the results into variables or arrays.
    Try something like this:
    DECLARE
         CURSOR C1 IS
                       SELECT  TABLE_NAME
                FROM    DB_MGMT.CTRL_TAB_RETENTION
                WHERE   RETENTION_PERIOD_IN_MONTHS = 11
                AND     rownum                  < 2;
         min_dt_skey    NUMBER;
         max_dt_skey    NUMBER;
         stmt            VARCHAR2 (100);
    BEGIN
        FOR i IN C1
         LOOP
            -- dbms_output.put_line('Table Name: ' || i.TABLE_NAME);
            stmt :='SELECT min(DT_SKEY), max(DT_SKEY) FROM DWH_RSRC_PERF.' || i.TABLE_NAME;
            dbms_output.put_line(stmt);
            EXECUTE IMMEDIATE stmt
             INTO min_dt_skey, max_dt_skey;
         dbms_output.put_line (  min_dt_skey   || ' = MIN (dt_skey), '
                        || max_dt_skey   || ' = MAX (dt_skey) for table '
                        || i.table_name
        END LOOP;
    END;

  • Need help with transferring iTunes library to different computer

    My old iPod stopped working so I bought a new one.  For my older iPod I use a different computer but I want to use a different computer for my new iPod.  I have all my songs on an external hard drive and I want to use that for my other computer.  How do I keep the same library stats such as play count, last played, date added etc. on the new computer?  When I am looking through the iTunes files there are multiple library databases and I don't know which one contains all my stats data that I want to transfer over to the new computer.  Also, how do I transfer all my playlists to the other computer?  Thanks!

    Copy the entire iTunes folder from the old computer to the new computer.

  • Need help in INBOUND idoc generation function module!

    Can anyone send me the inbound idoc function module !
    i have the outbound code but i need the inbound code

    Might be a constant C_WF_RESULT_OK is assigned to
    variable WORK_RESULT .
    Please check if they are declared in the function module ..

  • I need help recovering the DOWNLOAD ICON from the side bar thing

    i don't know how but the download was gone from the side bar one day, i guess my parents did something accidentally and took it off. But i don't know. is there any way for me to get that icon back on the side bar?

    To your other post - where is the home folder - - it's the little house in the Finder sidebar with your username after it.
    Yanda the panda wrote:
    but the download folder is completely gone from everywhere
    it only pops up a window when i download something
    That is not the downloads directory - that's the Safari local Downloads window. Not the same
    Now, are you saying that the real Downloads directory has been removed - deleted?
    Click on that home folder - the house icon and look carefully for a Downloads Folder. It should look like this:
    If you do not see it, perhaps it was moved.
    In the Finder search window, enter downloads. Select "This Mac" and "File Name" and see if it pops up.
    If not, do you have a backup? TM or something else?
    If not, we can create a new Downloads folder but alas, everything in the original is gone.

  • I need help forwared 7237-7240 twice for different ip adresses

    I use a wrt54g v6. I have port forwarded ports 7237-7240 on to my ip, but I want to know why can't i port forward the same ports but to a different ip address. Is there a way as to how to do this? Thanks alot to all in advance?

    So do you want the packets on those ports to go to a "different" IP, or do you want them to go to an additional IP?
    If you want them to split (get forwarded to 2 different IPs) I think that you're kind of stuck. Short of getting an ethernet *hub* that would broadcast all traffic to all devices puugged into it, and getting a little funky with your NIC (basically allowing the second NIC to read all traffic on the hub) I wouldn't even know how about trying to do that.
    Why do you want to do that anyway? If packet a goest to 192.168.1.1 and packet b goes to 192.168.1.2, how do they know how to get back and which packets go where etc?

  • I Need Help With My 4th generation Ipod!

    Ok. I have a ipod 30gb(not colored). I found it recently and i decided to use it again so i updated my itunes and stuff and then i plugged it into my computer. A message appeared and had two buttons Update(i think) and Restore(i know for sure). I pressed the restore button and thought it would be fine but now the ipod has an adaptor of somesort pointing to a wall plug. What do i do to reset it?

    When updating or restoring some iPods via a usb connection, it needs to be plugged into power via the charger to complete the process, and this is why you see that icon displayed.
    You may be able to complete the process via a car charger, or via a powered firewire port on the computer (with the required 6 pin cable of course) if you have access to either of those. Or maybe visit an Apple store if one is nearby.
    Or you can try this.
    http://www.bearsdriving.com/blog/archives/2005/10/youripod_tipo.html
    I make no claims as to whether this will work (but I've seen other posts where it has), but merely point it out.
    Other than that, your iPod cannot be used until you complete this process.

Maybe you are looking for

  • How to create effects like this ...

    Dear webmates : I'd like to know how to create rollover menus like this : http://perfeccionate.urp.edu.pe/server/rumbo/index.php/comunidad/programa-tv As you can see it shows you more than one option and big rollover menus... what tools ca I use to a

  • My usb drive won't connect to my macbook anymore.

    It says: MAC OS X can't repair the disk: you can still open or copy files on the disk, but you can't save changes to files on the disk. Back up the disk and reformat it as soon as you can. How would i go about?

  • IPod Mini skips while running

    I understand the problem: the hard drive can get jostled while I'm running, and the cache can only hold a certain number of songs. How do I convert songs that are currently at 128 bit rate to a smaller bit rate, like 56? This would allow the Mini to

  • Sort control does not show in drill down ?

    I have a sort control attached to a column header in one of my report and it works fine. However it does not show up in the drill down sections. Is there a way to fix that ? Thanks

  • Creating Online Documentation With Conditional Text

    I'm fairly new to conditional text and was curious if it was possible to create a document that can be hosted online with conditional text. The document versions need to contain links specific to each company referencing the document. For example, if