Batch relationship change

My organization is merging with another and we are currently operating with two domains while the project to migrate all of the object from one into the other is completed.  SCSM is implemented on Domain A, but is syncing object from both domain A and
Domain B's AD.  Before the AD migration/merge occurs Analysts from domain B have been given functional access to SCSM by creating a transitional account on Domain A for them and they do a run as using that account to access the console. 
We found this was necessary as even with the trust relationship between the two domains we cannot ad users from domain b to groups that are part of domain A, and where I have teams of analysts which now have people form both domains I needed to be able to
put them in one AD group.
The intention is that their regular account on domain B will be migrated over to domain A with SID history, so that all their other permissions (file system, database, shared mailboxces, etc) will all function, however all the relationships they have with
work items and config items in SCSM will be with the transition account.
What I need is a way to identify every relationship a transition account has in SCSM and to automatically change those relationships so they are with the migrated account.
I think this will apply to about a dozen accounts or so, so I have considered weather workflows could be used but I think that ballons very quickly and requires to many workflows to achieve the effect im after so I guess the nex possibility is operating
on the database itself.
Can any on provide any suggestions as to the best way to do this?
Thanks Eden

Hi Thomas,
 again thanks for your original response.  Theres been a bit of a delay but I've finally gotten around to trying to get the script you provided to work.  Unfortunately I've had some difficulties. 
I may not have been clear in describing the circumstance I need to address. Without worrying about the background, essentially I will need to replace all the relationships one user has to other objects in SCSM with relationships between a different user
and those objects, i.e. where ever the affected user was Windows.AD.User A it now needs to be Windows.AD.User B.  I only need to do this for a group of about a dozen users.
So I have modified you script slightly, here's my version:
$BlacklistedRelIDs = @([guid]"649e37ab-bf89-8617-94f6-d4d041a05171")
$UserClass = Get-SCSMClass -name microsoft.ad.User
$OldUser = get-scsmObject -Class $UserClass -Filter "UserName -eq 'scsm-transition'"
$NewUser = Get-scsmObject -Class $UserClass -filter "UserName -eq 'scsm-migration'"
$SourceRels = Get-SCSMRelationshipObject -BySource $OldUser
ForEach ($Rel in $SourceRels) {
if (($BlacklistedRelIDs -notcontains [guid]($Rel.RelationshipId)) -and ($Rel.IsDeleted -eq $False)){
$RelClass = Get-SCSMRelationshipClass -id ($Rel.RelationshipId)
$TargetObject = get-scsmobject -id ($Rel.TargetObject.id)
New-scsmRelationshipObject -Relationship $Rel -Target $TargetObject -Source $NewUser -bulk
Remove-SCSMRelationshipobject $Rel
$TargetRels = Get-SCSMRelationshipObject -ByTarget $OldUser
ForEach ($Rel in $TargetRels) {
if (($BlacklistedRelIDs -notcontains [guid]($Rel.RelationshipId)) -and ($Rel.IsDeleted -eq $False)){
$RelClass = Get-SCSMRelationshipClass -id ($Rel.RelationshipId)
$SourceObject = get-scsmobject -id ($Rel.SourceObject.id)
New-scsmRelationshipObject -Relationship $Rel -Source $SourceObject -Target $NewUser -bulk
Remove-SCSMRelationshipobject $Rel
so this just uses individual fixed source and target users, but since I only need to do this for such a small group of users its not really a problem to modify the script aqnd run for each affected user.
The good news is when I run it the source user is removed from relationships with a work item, e.g I have an incident that scsm-transition is the affected user, assigned user, and primary owner on and after the script is run the history of the incident shows
that the account running the script has removed those relationships, and thescsm-transition is no longer shown as affected, assigned, or primary owner in the incident form. 
The bad news is that it has not created the replacement relationships, i.e. it has not made scsm-migration the affected user, assigned user, or primary owner.
the out pout of the script in powershell is:
New-SCSMRelationshipObject : Cannot bind parameter 'Relationship'. Cannot convert the "d9683971-fad3-6874-e955-1e37aaa8651a" value of type
"Microsoft.EnterpriseManagement.Common.EnterpriseManagementRelationshipObject`1[[Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject,
Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]" to type
"Microsoft.EnterpriseManagement.Configuration.ManagementPackRelationship".
At line:19 char:47
+ New-scsmRelationshipObject -Relationship $Rel -Source $SourceObject -Target ...
+ ~~~~
+ CategoryInfo : InvalidArgument: (:) [New-SCSMRelationshipObject], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,SMLets.NewSCSMRelationshipObject
New-SCSMRelationshipObject : Cannot bind parameter 'Relationship'. Cannot convert the "46683d3c-3f60-bc7c-22dc-544c8b6a20a7" value of type
"Microsoft.EnterpriseManagement.Common.EnterpriseManagementRelationshipObject`1[[Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject,
Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]" to type
"Microsoft.EnterpriseManagement.Configuration.ManagementPackRelationship".
At line:19 char:47
+ New-scsmRelationshipObject -Relationship $Rel -Source $SourceObject -Target ...
+ ~~~~
+ CategoryInfo : InvalidArgument: (:) [New-SCSMRelationshipObject], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,SMLets.NewSCSMRelationshipObject
New-SCSMRelationshipObject : Cannot bind parameter 'Relationship'. Cannot convert the "5d194ac6-1f5c-29b6-f41d-8cf9fb202b91" value of type
"Microsoft.EnterpriseManagement.Common.EnterpriseManagementRelationshipObject`1[[Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject,
Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]" to type
"Microsoft.EnterpriseManagement.Configuration.ManagementPackRelationship".
At line:19 char:47
+ New-scsmRelationshipObject -Relationship $Rel -Source $SourceObject -Target ...
+ ~~~~
+ CategoryInfo : InvalidArgument: (:) [New-SCSMRelationshipObject], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,SMLets.NewSCSMRelationshipObject
New-SCSMRelationshipObject : Cannot bind parameter 'Relationship'. Cannot convert the "a1af6514-6003-f946-66d1-c1adf3aa0808" value of type
"Microsoft.EnterpriseManagement.Common.EnterpriseManagementRelationshipObject`1[[Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject,
Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]" to type
"Microsoft.EnterpriseManagement.Configuration.ManagementPackRelationship".
At line:19 char:47
+ New-scsmRelationshipObject -Relationship $Rel -Source $SourceObject -Target ...
+ ~~~~
+ CategoryInfo : InvalidArgument: (:) [New-SCSMRelationshipObject], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,SMLets.NewSCSMRelationshipObject
New-SCSMRelationshipObject : Cannot bind parameter 'Relationship'. Cannot convert the "4f540b48-4750-f47b-f69d-fbea3bb2ed58" value of type
"Microsoft.EnterpriseManagement.Common.EnterpriseManagementRelationshipObject`1[[Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject,
Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]" to type
"Microsoft.EnterpriseManagement.Configuration.ManagementPackRelationship".
At line:19 char:47
+ New-scsmRelationshipObject -Relationship $Rel -Source $SourceObject -Target ...
+ ~~~~
+ CategoryInfo : InvalidArgument: (:) [New-SCSMRelationshipObject], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,SMLets.NewSCSMRelationshipObject
Remove-SCSMRelationshipobject : Cannot process extension elements as EnterpriseManagementObject. User EnterpriseManagementObjectProjection for all extension
element CRUD operations.
At line:20 char:6
+ Remove-SCSMRelationshipobject $Rel
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (4f540b48-4750-f47b-f69d-fbea3bb2ed58:Guid) [Remove-SCSMRelationshipObject], InvalidOperationException
+ FullyQualifiedErrorId : Object,SMLets.RemoveSMRelationshipObjectCommand
Do you have any suggestion as to what I've got wrong?
Thanks Eden

Similar Messages

  • How can I recover from a Botched BATCH DATE CHANGE in iPhoto?

    Botched Batch Date Change iPhoto08
    Short Story: Intending to change the date for one photo I managed to change the dates for all 8,525 images in my iPhoto08 library to the SAME DATE!! I found that the original creation dates were saved in the in the Modified field that appears in the Photo Info Window / File metadata subsection. I would like some help figuring out how to set the Date Created to this File Modified Date that appears in the Photo Info Window.
    GORY DETAILS:
    I used iPhoto08/ Photos menu / BATCH CHANGE... /“Set DATE to 20100723 1:20:54 PM” with “Modify original files” checked. iPhoto changed all 8,525 images to the same date.
    I now realize I should have used Photos menu / Adjust Date and Time ... But the damage was already done. Unfortunately there was no Edit menu / Undo for this operation. ALL 8,525 images have the same date. I checked in the the iPhoto Information sidebar--same date all images.
    Next, as a test, I dragged an image to the desktop and opened it in Graphic Converter7.0.3. The same date “20100723 1:20:54 PM” appeared in the Image Browser List /”Date Created”, “Date Modified”, “Date Captured” metadata fields.
    The following appeared in the Graphic Converter
    Image Preview sidebar (subWindow) going left to right
    Image menu/button
    Date and Time: Friday, July 23, 2010 1:20:54 PM PT
    Exif menu/button
    File date and time: 2010:07:23 13:20:54
    Date and time of original data generation: 2010:07:23 13:20:54
    Unknown tag (36868): 2010:07:23 13:20:54 <- significant?
    ExifTool menu/button
    ExifTool Version Number:8.40
    Warning: [minor] Suspicious MakerNotes offset for tag 0x9001
    ----System----
    File Modification Date/Time: 2010:07:23 13:20:54-07:00
    ----IFDO----
    Modify Date: 2010:07:23 13:20:54
    ----ExifIFD----
    Date/Time Original: 2010:07:23 13:20:54
    Create Date: 2010:07:23 13:20:54
    <<<<<<OH MY GOD >>>>>> the BATCH CHANGE / SET DATE not only RESET the date for EVERY IMAGE in my library, it also changed the date metadata EVERYWHERE inside each individual image file.
    Actually it's my Mom and Dad's iPhoto library containing all the kids and grand kids pictures, family trips, important events, everything. There is no backup. I feel as if I have tipped over a file cabinet containing all our photos. Our “date and event” organized 8,525 image iPhoto library was now as useful as a giant shoebox. On second thought, a shoe box full of real photo prints would be more useful than my iPhoto library because the prints would have the print date stamped on them.
    At this point feeling desperate I closed my eyes and said a quick prayer to Saint Rita - Patron Saint of the Impossible.
    I returned to iPhoto .................and noticed the Show Photo Info MENU item in the Photo Menu.
    I selected it.
    And Low and behold,
    in the Photo Info WINDOW,
    under the Meta data File SUBSECTION, the correct photo creation date appeared -->" Modified: 20071002 05:46:07 PM" I checked different photos ... They all had different FILE MODIFIED dates. These dates were/are the old creation dates! My prayers were answered: THANK YOU SAINT RITA!
    But now I am really stumped! This File Modified Date seems to be some kind of external metadata that is indexed or keyed to each image. How is this metadata stored in the iPhoto library? How can I access this File Modified date? I now turn to you GREAT iPhoto WIZARDS. Pray tell, how can I set the “Creation Date to the file Modified Date” that appears in the Photo Info Window as a (scriptable?) batch process.
    I am on my knees for this one...please help. we have iphoto11 but afraid to upgrade to it. until i know more i don't want to loose this Modified Date metadata.

    thanks for the quick response...
    no simple solution because no backup to restore from
    iPhoto seems to be using file metadata as some sort of index key in the
    Photo Info Window. open up the iphoto library package and take a look at
    the .xml file -- ModDate is used everywhere. hoping to export this data and merge/join it to
    each image.
    still trying to figure it out.
    thanks,
    Tom

  • Batch status change with UD

    Hi Everybody,
    I have a question about batch status change while taking UD. I understand that stock posting and batch status for each UD code is decided by the value in 'Posting proposal UD' field in Selected Set settings. I understand that I can customize the movement types for the values (eg VMENGE01, VMENGE02 etc) in config. But that is only for stock posting. From what setting is the Batch status decided eg. If we approve, the batch is unrestricted and if we reject it is restricted.
    Can I customize those values which are available in the drop down in the 'Posting proposal UD' ? Can I create a value of my own ?
    Regards,
    Manish Saraswat

    Manish,
    execute tcode QS51
    you will be able to see 'Posting Proposal UD' in "Selected Set ". Now select that line (Posting Proposal UD line). Status for Posting Proposal UD should be "Released"
    After selecting that line on left hand side there is " Dialog Structure " in that there is " Selected Set Code " Click on that.
    Complete list of code will come you can add and modify those codes.
    Hope now its clear to you.
    Edited by: tejasg on Mar 24, 2010 4:21 PM

  • Help!  Batch Capture Changes My Logged Clips' Media Start & Media End

    I'd be very grateful for any help on this.
    I log a tape with about 40 clips ranging from 30 seconds to 4 minutes. I select the clips and start a batch capture. Everything appears to be capturing normally and I receive no error messages or dropped frame warnings - after my last clip is captured I get a "Successfully Captured" message.
    However, as soon as I click "Finished," all of my clip media start's, media end's, and durations in the log window arbitrarily change to weird times. All my media start points are 26 frames too early (I've tripple-checked that "Add Handles" is indeed deactivated), and the media end points make no sense at all.
    A clip that was once 44 seconds long is now only 12 seconds long, the media end point moved a whopping 34:03 too early. Another clip will become 2 seconds longer, the media start point still shifted back 26 frames, but with the media end now 31 frames too late. Checking the original files on my drive confirms that only these weird, unusable segments are what has been captured.
    What complicates things is that I just discovered today that if I capture locally to my internal hard disk, the clips capture normally (the times remain unchanged). But if I set my capture scratch to my external hard drive (a LaCie F800 2-TB RAID-5 using Firewire-800), that's when the clips start changing themselves. I ran disk utility and found no errors on the drive, and have never had a problem with it or any part of my configuration until the last month or so... the only changes to my system being the regular use of Software Update.
    On top of that, my colleague is experiencing a similar problem with batch capture changing his clip times, even though he is using a different computer (single-processor G5), a different video deck (Sony DHR-1000), and a different storage medium (Apple Xserve RAID).
    So my question is: What is happening! The only thing I can think of is that perhaps some update has a bug - but I can't find anyone with a similar problem online.
    Any help on this would be extremely appreciated! Thank you in advance for your advice.
    Dual 2.3GHz PowerPC G5 Mac OS X (10.4.4) Deck: JVC CU-VH1 / Storage: LaCie F800 2-TB RAID-5
    Dual 2.3GHz PowerPC G5 Mac OS X (10.4.4)

    Here's an update on this. Both my colleague and I have confirmed that if we capture to an internal or external drive that is not a RAID FCPro batch captures just fine.
    But, if the drive we are capturing to is a RAID (in my case a LaCie Biggest F800 and his case an Apple Xserve), then we get dropped frame reports and/or clip in's and out's changing after the batch capture is complete.
    We even tried reformatting one of the xServe's and rebuilding it as non-journaled, it didn't solve the problem.
    It seems impossible that we're the only ones to be experiencing this problem... does anybody have any help or suggestions!?

  • Splitting events after batch date change causes event to disappear

    Hi all,
    The basic (repeatable) scenario is this:
    o I scan in a bunch of old pictures I want to keep in iPhoto (lets say 10)
    o I import them into iphoto (no problems with import) 1 event with 10 pictures is created.
    o I then take a specific set of 4 photos and split them out of the main event into a new event (everything still ok) - 2 events, 4 and 6 events respectively.
    o I open the new event and do a batch date change on the 4 pictures, changing the date to the correct date of the picture
    o I exit the event expecting it to move up in the list of events (I sort by date). It's gone! iPhoto lists the 1 new event and its 6 photos
    o I change my sort (by time, by name, etc) and still not there.
    o I find my library in finder, open the package, and the files are still there.
    o I go back to iPhoto and click on "Photos". Walla! 10 pictures!
    o I undo the data change and they show up again in events - 2 new events, 10 total pictures.
    I've already done all the obvious checks (are you sorting by date, look up by even name, search by file name through all events etc.) I've talked with a product specialist and they said the standard "rebuild the library" which did not resolve the issue.
    I can repeat this until the cows come home in the existing library. I've created a brand new library and it does not repeat, do there is something in my library not right. But I don't buy the standard "redo your library from scratch" (36K pictures, 50 faces and hundreds of places). Just like with faces, you can discard the db files, there must be something besides "rebuild automatically and if that doesn't work sorry start over". Was iPhoto coded in Redmond?
    Has anyone had anything similar to this? I looked through the forums and couldn't see anything. If I have to rebuild this, I am done with iPhoto after having to rebuild due to faces too many times, and my question changes to what are folks recommendations for a more stable photo management software suite?
    Thanks!
    HOTG

    If the problem doesn't repeat in another Library then obviously the issue is with that library.
    As you've tried the basic rebuild: Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    The obvious solution is to restore a good version from your back up and, er, Walla! as you say yourself.
    Next least destructive option: Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    Regards
    TD

  • Can we express batch relationship structure in XML in the database table

    Hi
    please help me ..
    i have a batch XML batch structure ...can we express batch relationship structure in XML in tha database table?
    yes..then how?
    Thanks
    Amu
    Edited by: amu_2007 on Mar 25, 2010 6:57 PM
    Edited by: amu_2007 on Mar 25, 2010 7:03 PM

    But what is the problem with the initial solution given that split the XML into the data?
    I mean you could do something like this?
    SQL> create table batch (customer    VARCHAR2(10)
      2                     ,cust_name   VARCHAR2(10)
      3                     ,cust_type   VARCHAR2(10)
      4                     )
      5  /
    Table created.
    SQL>
    SQL> create table section (customer    VARCHAR2(10)
      2                       ,sect_name   VARCHAR2(10)
      3                       ,sect_depend VARCHAR2(10)
      4                       )
      5  /
    Table created.
    SQL> create table job_sections (customer        VARCHAR2(10)
      2                            ,sect_name       VARCHAR2(10)
      3                            ,job_sect_name   VARCHAR2(10)
      4                            ,job_sect_depend VARCHAR2(10)
      5                            )
      6  /
    Table created.
    SQL> create table job (customer        VARCHAR2(10)
      2                   ,sect_name       VARCHAR2(10)
      3                   ,job_sect_name   VARCHAR2(10)
      4                   ,job_type        VARCHAR2(10)
      5                   ,job_sub_type    VARCHAR2(10)
      6                   ,job_depend      VARCHAR2(10)
      7                   )
      8  /
    Table created.
    SQL>
    SQL>
    SQL> insert all
      2    when batch_rn = 1 then
      3      into batch (customer, cust_name, cust_type) values (customer, cust_name, cust_type)
      4    when section_rn = 1 then
      5      into section (customer, sect_name, sect_depend) values (customer, sect_name, sect_dependency)
      6    when job_sections_rn = 1 then
      7      into job_sections (customer, sect_name, job_sect_name, job_sect_depend) values (customer, sect_name, job_sect_name, job_sect_dependency)
      8    when 1=1 then
      9      into job (customer, sect_name, job_sect_name, job_type, job_sub_type, job_depend) values (customer, sect_name, job_sect_name, job_type, jo
    10  --
    11  WITH t as (select XMLTYPE('
    12  <BATCH customer="ABC" name="ABC1" type="ABC_TYPE">
    13    <BATCH_SECTIONS>
    14      <SECTION name="X" dependency="NULL">
    15        <JOB_SECTIONS name="JOB1" dependency="NULL" >
    16          <JOBS>
    17            <JOB type="X" sub_type="xx" dependency="NULL" />
    18            <JOB type="X" sub_type="yy" dependency="NULL" />
    19            <JOB type="X" sub_type="zz" dependency="NULL" />
    20          </JOBS>
    21        </JOB_SECTIONS>
    22      </SECTION>
    23      <SECTION name="Y" dependency="X">
    24        <JOB_SECTIONS name="JOB2" dependency="X" >
    25          <JOBS>
    26            <JOB type="Y" sub_type="xx" dependency="X" />
    27            <JOB type="Y" sub_type="yy" dependency="X" />
    28            <JOB type="Y" sub_type="zz" dependency="X" />
    29          </JOBS>
    30        </JOB_SECTIONS>
    31      </SECTION>
    32      <SECTION name="Z" dependency="Y">
    33        <JOB_SECTIONS name="JOB3" dependency="NULL" >
    34          <JOBS>
    35            <JOB type="....." sub_type="...." dependency="NULL" />
    36          </JOBS>
    37        </JOB_SECTIONS>
    38        <JOB_SECTIONS name="JOB4" dependency="NULL">
    39          <JOBS>
    40            <JOB type="...." sub_type="...." dependency="NULL" />
    41          </JOBS>
    42        </JOB_SECTIONS>
    43      </SECTION>
    44    </BATCH_SECTIONS>
    45  </BATCH>
    46  ') as xml from dual)
    47  --
    48  -- END OF TEST DATA
    49  --
    50  ,flat as (select a.customer, a.cust_name, a.cust_type
    51                  ,b.sect_name, NULLIF(b.sect_dependency,'NULL') as sect_dependency
    52                  ,c.job_sect_name, NULLIF(c.job_sect_dependency,'NULL') as job_sect_dependency
    53                  ,d.job_type, d.job_sub_type, NULLIF(d.job_dependency,'NULL') as job_dependency
    54            from t
    55                ,XMLTABLE('/BATCH'
    56                          PASSING t.xml
    57                          COLUMNS customer     VARCHAR2(10) PATH '/BATCH/@customer'
    58                                 ,cust_name    VARCHAR2(10) PATH '/BATCH/@name'
    59                                 ,cust_type    VARCHAR2(10) PATH '/BATCH/@type'
    60                                 ,bat_sections XMLTYPE PATH '/BATCH/BATCH_SECTIONS'
    61                         ) a
    62                ,XMLTABLE('/BATCH_SECTIONS/SECTION'
    63                          PASSING a.bat_sections
    64                          COLUMNS sect_name        VARCHAR2(10) PATH '/SECTION/@name'
    65                                 ,sect_dependency  VARCHAR2(10) PATH '/SECTION/@dependency'
    66                                 ,section         XMLTYPE      PATH '/SECTION'
    67                         ) b
    68                ,XMLTABLE('/SECTION/JOB_SECTIONS'
    69                          PASSING b.section
    70                          COLUMNS job_sect_name        VARCHAR2(10) PATH '/JOB_SECTIONS/@name'
    71                                 ,job_sect_dependency  VARCHAR2(10) PATH '/JOB_SECTIONS/@dependency'
    72                                 ,job_sections         XMLTYPE      PATH '/JOB_SECTIONS'
    73                         ) c
    74                ,XMLTABLE('/JOB_SECTIONS/JOBS/JOB'
    75                          PASSING c.job_sections
    76                          COLUMNS job_type        VARCHAR2(10) PATH '/JOB/@type'
    77                                 ,job_sub_type    VARCHAR2(10) PATH '/JOB/@sub_type'
    78                                 ,job_dependency  VARCHAR2(10) PATH '/JOB/@dependency'
    79                         ) d
    80            )
    81  --
    82  select customer, cust_name, cust_type, sect_name, sect_dependency, job_sect_name, job_sect_dependency, job_type, job_sub_type, job_dependency
    83        ,row_number() over (partition by customer order by 1) as batch_rn
    84        ,row_number() over (partition by customer, sect_name order by 1) as section_rn
    85        ,row_number() over (partition by customer, sect_name, job_sect_name order by 1) as job_sections_rn
    86  from flat
    87  /
    16 rows created.
    SQL> select * from batch;
    CUSTOMER   CUST_NAME  CUST_TYPE
    ABC        ABC1       ABC_TYPE
    SQL> select * from section;
    CUSTOMER   SECT_NAME  SECT_DEPEN
    ABC        X
    ABC        Y          X
    ABC        Z          Y
    SQL> select * from job_sections;
    CUSTOMER   SECT_NAME  JOB_SECT_N JOB_SECT_D
    ABC        X          JOB1
    ABC        Y          JOB2       X
    ABC        Z          JOB3
    ABC        Z          JOB4
    SQL> select * from job;
    CUSTOMER   SECT_NAME  JOB_SECT_N JOB_TYPE   JOB_SUB_TY JOB_DEPEND
    ABC        X          JOB1       X          xx
    ABC        X          JOB1       X          yy
    ABC        X          JOB1       X          zz
    ABC        Y          JOB2       Y          xx         X
    ABC        Y          JOB2       Y          yy         X
    ABC        Y          JOB2       Y          zz         X
    ABC        Z          JOB3       .....      ....
    ABC        Z          JOB4       ....       ....
    8 rows selected.
    SQL>But it would depend what you are actually after in terms of primary keys, and table relationships etc.
    Let me put this simply for you...
    h1. IF YOU DON'T DEMONSTRATE TO US WHAT OUTPUT YOU REQUIRE, WE CAN'T GIVE YOU AN ANSWER

  • Batch date change problem in iPhoto

    I have hundreds of printed photos I scanned in 2009. Even though they were taken over three decades iPhoto thinks they were all taken in 2009. I separated them into years, numbered them, and put them in folders which became events. I tried using batch date change -- the first one in the event is OK, but the others changed  all different. Example: I changed picture one, in event folder "1999" from 3/5/2009 to 1/1/1999. All of the rest of the pictures changed to the same time difference that they were when I scanned them. I didn't scan them all in chronological order, so that doesn't help at all. Do I have to manually change each of my 9000 photos? This is a problem when I try to show a chronological slide show on Apple TV.

    Scanned photos do not have an EXIF Capture Date field in the file like photos taken with a digital camera do.  Therefore iPhoto uses the file created date or import date for those photos.
    You will have to group all 1999 photos into an album, arrange them in the order you want and then use the Photos ➙ Batch Change ➙ Date menu option and add a 1 minute or so between photos.
    Then do the same for the next year's photos.
    OT

  • Batch date change corrupts the dates

    I need some help with the batch name change in iPhoto. I recently tried to change some dates of an entire event to 12/25/2008. Once the batch change was done, the dates all appear as a corrupted year of 12/09/-2007 with the line in them. They then disappear completely from the event and can only be found on the photo section.
    I have tried the adjust date and time and I have tried rebuilding the library and transferring photos to new libraries, but get the same error.
    thanks,

    Close iPhoto, delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your User/Library/Preferences folder, launch iPhoto and see if that helps.
    Happy New Year
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Batch time change tool similar to iPhoto?

    Good day. I was wondering if (and how!) I could do a batch time change, using incremental times of 3 minutes between scanned images, with a group of images. I have several hundred images that were scanned at different times and I really don't care to change the date and time of each one individually.
    I know that I can do this work in iPhoto and import into Aperture...that's what I have always done in the past. Is there a way to do this so I can combine this into one step and work only in Aperture? A download, plug-in, etc?
    Thanks for your help!

    Ah...the ole work around....used iPhoto, set the preferences to not copy the files to iPhoto, created an album, manually moved the photos into correct order, ran the batch change with incremental time between each photo with modify original files checked, deleted photos out of iPhoto which preserves the original file with the new date stamp cause not copied but references, went back to Aperture and imported fresh....ALL GOOD!

  • Batch title change in photo version 1

    The new "Photo" has changed the user interface completely.  Is there a way to to the "batch title change" for a group of photos?  There are instructions for how to do for one, but I'm hoping that this has not been lost.  I'm using version 1.
    Is there any way to remove the conformation that is now required each and every time you want to delete a photo or group of photos? 
    Thanks,
    DMW

    Batch changing is not yet supported in Photos for Mac.
    You could try to do it using AppleScript and Automator.
    I posted a few scripts on the Photos User Tips page:
    See:  Photos for Mac
    Batch Changes in Photos for Mac:  Change the titles to a Given String
    Photos for Mac: Batch Change the Date and Time to a Fixed Date
    Photos for Mac: Batch Change the Descriptions

  • Batch no change

    hi all,
    During transfer posting in which all the cases does the Batch Number change .
    thanks

    The batch number will remain the same for trnsafer postings as you are moving a btach from one positon to the other.
    Unless you are using any user exit for the batch numbers based on the location/ plant
    Thanks & Regards
    Kishore

  • AppleScript for Batch Title Changes Needed

    I need to change the title of 75 items in a folder on my G5 by one character. Help says there's a Script Menu in the Finder bar, but I suspect the Help is for Tiger & I have Panther, and there is no such option. I only have Script Editor.
    Would anyone be willing to provide an AppleScript for batch title changes so I can make the needed change? I'm not a programmer. Secondly, how do I activate the script?
    David

    Jeff,
    Thanks for your reply. In Example Scripts/Finder Scripts, I see Replace Text in Item Names.scpt. I'm thinking this is the script I need. Not so?
    Can you recommend a resource that would tell me how to fill in the blanks? Apple refers to Getting Started With AppleScript, but I don't see it as an available PDF file. AppleScript Language Guide is available, but all I really want is something simple, very basic.

  • Batch Process Change Canvas Size Buggy

    I have 300+ products shots that need to go up to our website.
    Using FW CS3 I was able to resize and optimize both full size
    images and the thumbnails. The issue is due to our website setup
    the thumbnails are expected to be exactly 100x100. If the canvas
    size is irregular the image gets stretched or squeezed when served
    up on the site.
    So I created a custom action to set the canvas size to 100 x
    100 with a white background and to expand from the center out. When
    I run this manually everything is ducky. But when I add it to my
    batch process the actual content of the thumbnails moves from image
    to image. Some items are centered fine, some are too far left or
    too far right (or high,low) some are shifted so much that they are
    actually cut off to the left or right. There seems to be no rhyme
    or reason to it.
    Here is how the batch is set up:
    It grabs the original file ( a press resolution PSD file) and
    fit to size to 100 x 100. Then I run the command to set canvas size
    to 100x100 white background. And then it exports it to optimized
    jpeg. I have tried running the actions separately. And when I just
    run the fit to size and optimization as a batch the thumbs look
    fine no weird positioning. So I know it is the command.
    Any ideas?

    Thankyou Heath
    If I choose scale > scale to fit area > then choose a maximum width or height, that works for that part of the process.
    Percentage doesn’t work, because I need them to be a particular size (either width or height, doesn’t matter , as long as nither of them exceeds 00px)
    For the part that I then want to find the smallest measurement (width or height) and make a particular size, there doesn’t seem to be any way that I can find in FW to do that.
    But, after searching on line, I found an app that does all that and more, its brilliant.  It will find the largest side, the smallest side, or whatever and change it to what you want and rescale the other side to fit.
    This is the link - http://www.rw-designer.com/picture-resize
    Fiona

  • Batch Capture Changes Media Start, End, and Duration

    Hello all... For some reason, when I batch capture from an imported batch list in FCP 4.5, the program changes the media start, end, and duration just slightly once the capture has completed. Does anyone know why this might be occurring?

    OK... I don't believe it has to do with drop frame or non-drop frame issues, and here's why... I ran a series of tests.
    The footage was originally shot with two cameras, an A Cam and a B Cam, which were Jam Synced together. The original A Cam tapes were log and captured normally. But for the B Cam tapes, we exported a batch list to excel, performed a rename function where _B was added to all file names and reel names, and brought the data back into FCP by importing a Batch List at 29.97.
    For the tests, I experimented with only one clip. First, I noted the timecode for the media start and media end when the file was uncaptured. Next, I placed the A Cam Tape in the deck and did a batch capture on the one clip. The program changed the media start and end times upon hitting ok. Here were the results of the first test:
    LOGGED: MS (05:50:39:26) ME (05:51:41:01)
    CAPTURED A CAM: MS (05:50:39:17) ME (05:51:41:07)
    Then, I undid the capture so that the timecode would revert back to the precaptured state. I placed the B Cam tape in the deck and ran the capture again, on the same clip, in Batch Capture mode. The program changes the media start and end yet again, but this time, changed it in a different way:
    LOGGED: MS (05:50:39:26) ME (05:51:41:01)
    CAPTURED B CAM 1st Attempt: MS (05:50:39:16) ME (05:51:41:06)
    So then I undid the capture again to revert back to the logged settings, and put the EXACT same tape in the deck, and ran the batch capture in exactly the same way. This time however, FCP didn't change anything. It logged the clip correctly. I tried it yet again, in the same way, and it did it perfectly again:
    LOGGED: MS (05:50:39:26) ME (05:51:41:01)
    CAPTURED B CAM 2nd Attempt: MS (05:50:39:26) ME (05:51:41:01)
    CAPTURED B CAM 3rd Attempt: MS (05:50:39:26) ME (05:51:41:01)
    So I ask again... what is up with FCP 4.5?

  • VL02N Batch INPUT, change field LFIMG

    HI gurus,
    On a selection screen i have those:
    parameters: p_vbeln
    select-options: s_posnr
    parameter: p_lfimg
    I did a BATCH input on VL02N on a delivery that has 2 items. When i'm trying to change the delivery quantity using the parameters and the select options on the selection screen i can't modify the field LFIMG with the value of parameter p_lfimg.
    PERFORM bdc_dynpro      USING 'SAPMV50A' '4004'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'LIKP-VBELN'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '=ENT2_T'.
      PERFORM bdc_field       USING 'LIKP-VBELN'  <b>wa_lips-vbeln. </b>  "aici
      PERFORM bdc_dynpro      USING 'SAPMV50A' '1000'.
      PERFORM bdc_field       USING 'BDC_OKCODE'  '=SICH_T'.
    PERFORM bdc_field       USING 'LIPS-POSNR'  wa_lips-posnr.
    PERFORM bdc_field       USING 'BDC_CURSOR' <b>'LIPSD-G_LFIMG(01)'.</b>
      PERFORM bdc_field       USING 'LIPSD-G_LFIMG(01)' p_lfimg.  "aici
    THE PROBLEM is that vl02N modifies only the field 01 , although i want to modify the quantity for the position posnr that i've selected in select-options. How can i tell SAP to go and modify delivery quantity for the position that i;ve selected in select-options?
    Pls help.

    Previous answer was copy pasted from LSMW loading multiple structured records..

Maybe you are looking for