Regarding updating the Flags for tracking history in customer dimension

Hi Friends,
I need help,regarding tracking history in dimension tables.Actaully we have customer table and there is id and effective_date/expiration .Previously we were recieving 31/dec/9999 as highend date and I was able to update the active_flag based on this date in the table.Right now we started recieving the different dates
as 31/dec/2014,31/dec/9999.
I was using the below query :
UPDATE MDM_CUSTOMER_MST
SET ACTIVE_FLAG = 'N',
DELETE_FLAG = 'Y',
EFFECTIVE_END_DATE = TRUNC(CURRENT_DATE) -1
WHERE TRUNC(EXPIRATION_DATE) <>
(select max(EXPIRATION_DATE)
FROM MDM_CUSTOMER_MST
where ACTIVE_FLAG = 'Y'
AND CUSTOMER_TYPE = 'FACILITY'
and ACTIVE_FLAG = 'Y'
and CUSTOMER_TYPE = 'FACILITY'
AND CUSTOMER_KEY <> '-1'
it is working only if the highend date is '31-dec-9999' it is not working to track the history if it is '31-dec-2014' .could some one please help me to how to update the flag.

Hi,
user9977206 wrote:
Hi Friends,
I need help,regarding tracking history in dimension tables.Actaully we have customer table and there is id and effective_date/expiration .Previously we were recieving 31/dec/9999 as highend date and I was able to update the active_flag based on this date in the table.Right now we started recieving the different dates
as 31/dec/2014,31/dec/9999.
I was using the below query :
UPDATE MDM_CUSTOMER_MST
SET ACTIVE_FLAG = 'N',
DELETE_FLAG = 'Y',
EFFECTIVE_END_DATE = TRUNC(CURRENT_DATE) -1
WHERE TRUNC(EXPIRATION_DATE) <>This site doesn't like to display the &lt;&gt; inequality operator. Always use the other (equivalent) inequality operator, !=, when posting here.
Did you mean to use TRUNC (expiration_date) above, but expiration_date (without TRUNC) below?
(select max(EXPIRATION_DATE)
FROM MDM_CUSTOMER_MST
where ACTIVE_FLAG = 'Y'
AND CUSTOMER_TYPE = 'FACILITY'
and ACTIVE_FLAG = 'Y'
and CUSTOMER_TYPE = 'FACILITY'
AND CUSTOMER_KEY <> '-1'Again, it looks like a != sign is missing.
>
it is working only if the highend date is '31-dec-9999' it is not working to track the history if it is '31-dec-2014' .could some one please help me to how to update the flag.I'm willing to share what I know about SQL. Are you willing to share what you know about this problem? Post a complete test case that people can run to re-create the problem and test their ideas. Include CREATE TABLE and INSERT statements for some sample data (as the table is before the UPDATE) and the results you want from that sample data (that is, the contents of the table after the UPDATE). Explain how you get those results from that data.
As Jeneesh said, see the forum FAQ {message:id=9360002}

Similar Messages

  • BAPI_PO_CHANGE to update the Price for the line item not updating the Price

    Hi,
    I am using BAPI_PO_CHANGE to update the Price for the line item. This BAPI is not updating the Price. I am using external cummit also, but the BAPI is not updating price.
    I am passing following data to the BAPI.
    Plant: CQ11
    PO                   Material                Price
    4500002142     TEST_BATCH     12
    Please provide suggestion.
    Regards,
    Jubin.

    Hi,
    check this link...this has sample code
    [http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm]
    Regards,
    Surinder

  • Table to update the substitutes for workflows

    Hello, as it is the table to update the substitutes for workflows?

    Hi,
    Yes - HRUS_D2
    Try using function module RH_SUBSTITUTES_LIST or RH_SUBSTITUTION_MAINTAIN to do the maintenance of substitutes.
    If this is done in the background then there is an RFC function module (don't know this off by heart though)
    Regards
    Robin

  • MR 11 not updating the invoicing for services

    Hi All,
    I have a scenario where the client uses MR11 for clearing the invoices.
    He does not use MIRO for invoicing.
    During our observation it is found that using MR11 does not update the invoices for services but the invoices for the material received is updated while checking the reports like ME2N.
    I have checked the Service based IV and the GR based IV in the  invoice tab of PO.
    Can you please advice me as to why this is happening only in case of services.
    Thanks and Regards
    Sridhar.

    Hi Charlie,
    Thank you very much for the response.
    Actually I am looking for the IR reduction and not the GR reduction.
    The note you have mentioned applies for GR reduction.
    Also we are in the ECC 6 environment.
    Please update me with further information.
    Regards
    Sridhar

  • Update the url for attachments in SAP

    Hi All,
    We want to update the url for attachments in SAP in the transaction
    code MIR4.As there are 300000 invoices in SAP , please let us know how
    we can update the url for the attachments.
    Thanks

    Hello,
    Once try
    CALL FUNCTION 'BBP_ATTACH_BUILD_URL'
    EXPORTING
    is_attach = ls_attach
    IMPORTING
    ev_url       = lv_url
    TABLES
    et_messages = lt_messages.
    Regards,
    Neelima

  • Looking for help to update the certificate for my Exchange Email Account...

    I'm trying to update the certificate for my Exchange Email Account...Dell had me delete the account, install the new certificate on my phone, and set up the email again...But it still won't work and acts like it can't find/use the new cert.  Any suggestions besides a hard resest of the phone?

    That's a great question, LSchmitz!
    Is the e-mail account on your cell phone? Which device? If its on your phone, an Exchange e-mail, may need to be provisioned/ set up by your employer/ IT department.
    VanessaS_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • HT1918 I cancelled a payment through PayPal. How do I update the payment for that charge?  I looked at my payment information and it has my credit card information.  I'm not sure where to update the PayPal part of payment.

    I cancelled a payment through PayPal. How do I update the payment for that charge?  I looked at my payment information and it has my credit card information.  I'm not sure where to update the payment that was associated with my PayPal account?  I am not sure what that paid for?  I am trying to process updates on my IPhone &amp; IPad for apps. I have already downloaded. 

    Hi Xellana, and a warm welcome to the forums!
    I'm looking for information and pricing on possibly upgrading the processor from the PowerPC to Intel.
    While anything is possible if you had enough money... NOPE, you can't change the CPUs to Intel, nor can you get any faster PPC upgrades for it. It'd be far cheaper to buy a new IntelMac than to replace everything inside the G5, and I mean just about everything, then figure out how to machine the case & such to mount Intel Logic Board, Graphic Card & such.
    Sorry.

  • I tried to update the software for my iPhone 4S. It froze, and now won't turn off, or on, or sync.  Any ideas on how to fix this?

    I tried to update the software for my iPhone 4S, 16 GB to the most recent version (8.1?).  I don't know what I was updating from, because I can't access that, but it was whatever was installed on it (I got it about a year ago, so probably 6.something). 
    It froze, and now won't turn off, or on, or sync with my macbook plus, which is what I have always sync'd it to.  (I backed it up and sync'd it right before I tried to update the software.)
    Since it originally froze almost 3 hours ago, it shows a white screen with the apple on it and a line underneath.  When I try to sync with my laptop, it says it needs me to enter a passcode on the phone, which I can't enter because the screen is frozen.  So I'm unable to access the iPhone portion of iTunes.
    I have tried to turn it off, with no luck.  I have tried rebooting my laptop and syncing, but I still get the same result.
    Does anyone know how to fix this?
    I really wanted to wait to update the software, but I was having internet connectivity issues for the past 3 weeks, and Sprint suggested updating the phone's software.
    Thanks in advance for your help!

    Hi NWL1,
    Thanks for the question. If I understand correctly, the iPhone won't update and is stuck. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    Thanks for using Apple Support Communities.
    Have a great day,
    Mario

  • How do I update the iOS for my 1st generation iTouch?

    I am having difficulty updating the iOS for my 1st generation iPod touch. It is currently at 3.1.3. Can anybody tell me if this is possible?

    A 1G iPod Touch cannot be upgraded past iOS 3.1.3. Sorry.
    B-rock

  • HT1483 I get a message "The Itunes server could not be contacted, check your internet connection" when trying to check for Ipod Nano software updates. I have a 1st generation Nano and haven't updated the software for a while. My internet connection is wor

    I get a message "The Itunes server could not be contacted, check your internet connection" when trying to check for Ipod Nano software updates. I have a 1st generation Nano and haven't updated the software for a while. My internet connection is working. Was thre a change in the internet address for NANO software updates? Do I have to reconfigure something in Itunes to point to the correct address?

    What version of iTunes are you using?  The latest is 10.6.3. In iTunes, choose Help -> About iTunes to check the version number. If it's lower than 10.6.3, download the latest version from here.
    B-rock

  • Trying to update the software for my iphone and it keeps saying download has been corrupted. an same for imac update. help?

    trying to update the software for my iphone and it keeps saying download has been corrupted. an same for imac update. help?

    Hi NWL1,
    Thanks for the question. If I understand correctly, the iPhone won't update and is stuck. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    Thanks for using Apple Support Communities.
    Have a great day,
    Mario

  • Can you please update the link for the flash player standalone installer?

    Can you please update the link for the flash player standalone installer?
    Link: http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_plugin_debug_3 2bit.exe
    Source: http://kb2.adobe.com/de/cps/191/tn_19166.html#main_ManualInstaller
    Source: http://forums.adobe.com/thread/889580

    Dogs Key wrote:
    Source: http://kb2.adobe.com/de/cps/191/tn_19166.html#main_ManualInstaller
    That is an old document (Flash Player 10.3) that shouldn't be there anymore.  (The English document redirects to the link below.)
    The download links for the offline installers for FP 11.2 are here http://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-windows.html#Ins tall_in_a_firewall_proxy_server_environment
    I have updated the download links for FP 10.3 in http://forums.adobe.com/thread/889580

  • Windows 7 will not let me update the driver for my iphone 4s so I can see it in iTunes. Any suggestions?

    Windows 7 will not let me update the driver for my iphone 4s so I can see it in iTunes. Any suggestions?

    You turned off all firewall and antivirus ? You could try downloading the update via a browser - what device are your trying to download the update for ? If it's an iPhone 4 :
    GSM / sim card model
    CDMA model
    Then in iTunes press and hold the shift key on Windows when clicking the Check For Updates button which should let you navigate to the downloaded file

  • How to update the path for a field which is of type textarea

    Hi,
    1.I have multiple record block,i need to update the textarea field in this multi entry block.I have put a for loop to achieve the same,however i'm able to update the path for text field,checkbox,selecttype,but am unable to update the path for field which is of textarea.Please suggest.
    2. Also i have another problem which occurs randomly.although i have record for a button click event in  my property file,button click is not happening during the playback.am getting error asVariable "obj.libraryname.web_button_BTN_1" not found for string:
    please not i have entry for the above button in my property file.
    Please suggest.

    Say i have 5 rows then
    for(int i=1;i<=5;i++){
    String Newpath = updatepath(eval("{{obj.libraryname.web_input_text_fieldname}}"),i)
    web.text_area(Newpath).setText("Text to be set")
    Below function is used to update my path
    public String updatepath(String path,int i) throws exception {
    String FPath = "";
    if(i<2) {
    FPath = path.substring(0, path.indexOf("'", path.lastIndexOf("@id=")+5))+path.substring(path.indexOf("'", path.lastIndexOf("@id=")+5));
    } else {
    FPath = path.substring(0, path.indexOf("'", path.lastIndexOf("@id=")+5))+(i-1)+path.substring(path.indexOf("'", path.lastIndexOf("@id=")+5));
    return Fpath
    anyother way to update path and set the fields in mutiple block is appreciable
    thanks
    Suresh

  • HT4623 i am trying to update the os for an iphone 3???

    i am trying to update the os for an iphone 3

    If you are running ios 4.2.1 and are on a iphone 3g, then your at the end of the road for updates and would have to upgrade your phone to a newer phone in order to get the latest ios.

Maybe you are looking for