Add prproj sequences into AME, via scripting

Hi,
we're using CS4 and the "Watch Folder" feature would have been nice, if it worked on prproj files.
I tried to see what happens during export with a Sysinternals tool named "process monitor" but the log is just too big to make sense of.
How can I add a prproj sequence to AME (Media Encoder) from the command line, or via windows scripting host, or via APIs?
Our projects usually have just one sequence, or it has a known name. Since prproj files are XML, we could even have our own heuristics in script code. All I need is a way to feed a sequence from a prproj into AME.
Choosing a named preset from AME is okay. We could provide all encoding settings explicitly though, if that's required.
We need this because we have dedicated encoding boxes on the network and we could push a project (including video and audio sources) into a shared directory for the encoding box to pick up. Right now, we have to physically be at the encoding box, opening the prproj and exporting the desired sequence. It'd be nice to be able to cut and edit somewhere else and just push the encode job over the network.
Is there any way?

AME has no trouble at all understanding PP project files, and uses them regularly to do it's job.  Just not via the Watch Folder.  Sequences have to be manually set up.
Indeed! I should have added " Watch Feature"  to maintain clarity.
...AME cannot transcode a PP sequence from another machine.
Yes it can; we've done it and it works great! But even if it didn't, automatically pushing files to another computer's local storage is trivial. In either case, you then have to manually load the project & sequence, which gets back to the OP issue I think.
To crackwitz or anyone else who stumbles upon this, there may be a workaround. You may be able to write a script via extendscript in AE, and Dynamic Link to a PPro project (locally stored or otherwise), then render from AE. My trials indicate that AE renders our projects at 50% the speed of PPro/AME (a well-known issue). That said, the ability to offload the rendering to a non-editing machine is worth the tradeoff in our case (it may not be in all cases). There are additional things to consider as well, including encode setting inconsistencies between PPro/AME and AE. The part we have not tested is whether you can specifiy a sequence via extendscript. If not, this will not work. If we confirm one way or another, I'll post back.
It'd be great if Adobe could kick it up a notch for customers that need greater levels of automation and work-flow efficiency with regards to rendering. However, these types of features have been a need for us for years, so I would encourage anyone interested not to wait on Adobe for this, and experiement with work-arounds, and share what you come up with!

Similar Messages

  • How to add a report into the SAP-SCRIPT .using PERFORM ......ENDPERFORM

    My question is that How to add a report into the SAP-SCRIPT .
    by using PERFORM ......ENDPERFORM
    I don't know how to used it .

    Hi Sandeep,
    Please check this link
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
    http://www.allinterview.com/showanswers/37425.html
    Calling ABAP Subroutines: PERFORM
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
    The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
    From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (u2018First pageu2019, u2018Next pageu2019, u2018Last pageu2019) is printed as local variable symbol.
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY u2018PAGEu2019.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018NEXTPAGEu2019.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018BARCODEu2019.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = u2018|u2019. "First page
    ELSE.
    OUT_PAR-VALUE = u2018||u2019. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = u2018Lu2019. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Best regards,
    raam

  • Loading new curves into report via Script

    Hello everyone!
    I tried the following to add a curve into a report via VBS-Script
    Call GraphObjNew("2D-Axis","MyGraph")
    Call GraphObjOpen("MyGraph")      
      D2AXISSYSTEM     ="one system"
      Call GraphObjNew("2D-Curve","MyCurve")
      Call GraphObjOpen("MyCurve")
        D2CCHNXNAME      ="Eigenschaften/Zeit"
        D2CCHNYNAME      ="Eigenschaften/Geschwindigkeit"
      Call GraphObjClose("MyCurve")
    Call GraphObjClose("MyGraph") 
    Call Picupdate()
    The Script runs without errors, but the Curve won't be added into the 2D-Axis Object. Does anyone know how to solve this problem?

    Hi Robert,
    Wenn I modify your code ever so slightly to operate on the channels I have in the Data Portal, and then execute the code in DIAdem 10.2, it works perfectly for me:
    Call GraphObjNew("2D-Axis","MyGraph")
    Call GraphObjOpen("MyGraph")      
      D2AXISSYSTEM     ="one system"
      Call GraphObjNew("2D-Curve","MyCurve")
      Call GraphObjOpen("MyCurve")
        D2CCHNXNAME      ="[1]/[1]"
        D2CCHNYNAME      ="[1]/[2]"
      Call GraphObjClose("MyCurve")
    Call GraphObjClose("MyGraph") 
    Call Picupdate()
    Of course, it creates a tiny little graph in the upper left hand corner of REPORT, which is probably not exactly what you want, but it is what you're asking DIAdem to do for you with the code.  I assume this is not happening for you.  What version of DIAdem are you using?
    On another note, I'd actually encourage you not to create the 2D-Axis programmatically, but rather to configure its location and appearance by hand and save a *.TDR file, which you can then load with PicLoad() or PicFileAppend().  If you leave off the first line of your code, the rest of it will then programmatically add curves and configure them as you wish.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Changing the Task Sequence Deployment Options via script

    Hi all,
    I am fairly new to SCCM 2012 scripting/SDK and couldn't find any helpful examples how to change the deployment options of task sequences by using a script.
    The problem is: we have got a significant number of TS that have the deployments set to "Download content locally when needed by running task sequence".
    I have to change this setting to "Download all content locally before starting task sequence".
    Afterwards I need to create a list of all changed TS Deployment options and also a list of current settings of all TS Deployment options.
    Therefore I would need a script that can read and set this particular option of the TS.
    Does anybody have a script that can do such tasks? Any help is highly appreciated.
    Btw, I am not picky, I can handle WMI, SQL, VBS, PowerShell, .Net Code (vb.net or c#). Whatever you have handy would be quite helpful.
    Many thanks
    Amir

    Hi,
    The Set-CMTaskSequence -DeploymentOption could help you change this setting.
    Set-CMTaskSequence
    Best Regards,
    Joyce Li
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Loading scripts - what's the difference between loading into edge via script window and including a script in the html document?

    I have a html page that loading in two edge compositions and an external custom javascript file. The javacsript file includes the bootstrapCallback so I can store references to the loaded compositions and can communicate with them. This seems to work well. The problem have is when I also try and load in a custom plugin javascript files into the edge compositions via the script window inside edge - I don't understand how this works, for example if I load in a custom javascript file into one of the compositions can only that composition use it's funcitionality? Is loading in scripts via edge script window the same as including in html document, I'm confused how the two relate, please help me understand.

    I have a html page that loading in two edge compositions and an external custom javascript file. The javacsript file includes the bootstrapCallback so I can store references to the loaded compositions and can communicate with them. This seems to work well. The problem have is when I also try and load in a custom plugin javascript files into the edge compositions via the script window inside edge - I don't understand how this works, for example if I load in a custom javascript file into one of the compositions can only that composition use it's funcitionality? Is loading in scripts via edge script window the same as including in html document, I'm confused how the two relate, please help me understand.

  • Incoming Payment add in sequence via SDK

    Hi guys,
    I want to use the SDK to add an incoming payment based on an invoice. It will only be a partial payment however and I want to pay the invoice in the same way that the "Add In Sequence" button works. I do not want the invoice to close until it is paid in full.
    Can anyone help?

    Hello
    Pay in Sequnece is a business logic, you must code the same  logic as B1 client uses.
    Of cource it is possible. I am sure, until the invoice not fully payed, the sap b1 internal reconsiliation engige will not close the sales invoice, os it will stay opened automatically. (not payed totally, you will see the reaining amount when you open the invoice via B1 client).
    logic should be coded:
    1. get the payment anoumt and customer
    2. get open  of the customer and sort them by date (sequnece based on date).
    here you mayuse a query based on jdt1 (balduedeb and balduecred are the fields holding the open amount of a transaction, ie unpayed amount of the incoive or a Journal entry)
    select * from jdt1 where shortname = 'cardcode' and balduedeb-balduecred != 0
    3. issue the payment object, until the payment amount is fit wiht the selected open items amount.
    Regards
    János

  • OSX 10.9 Maverick add a LDAP server via script

    I use applescript to add a LDAP sever on 10.8, but after the 10.9 released, I found the script cannot use any more.
    Seems is the new Mail app doesn't support LDAP sever , it is integrated to Internet Accounts
    However the SAMPLE script is still the same. (  /Library/Scripts/Mail\ Scripts/Create\ New\ LDAP\ Server.scpt )
    Does any one know how to config internet accounts via script (BASH script is OK too)?
    the new mail app does not understand
    make new ldap server with properties {name:theName, host name:theAddress, search base:theSearchBase, Çclass ldpoÈ:thePort, scope:theScope}
    any more.

    I'd first read the subject and thought this involved creating an entire LDAP server via script and thought... whoa, that's some script.    
    But you're seeking to reference a remote resource or some automated way to configure your client mail, and that's currently using LDAP, right?  If so, then Apple has shifted over to Profiles and away from LDAP and MCX and related.  Profiles would be the approach I'd follow here, either with OS X Server and its profile manager or some other MDM service.
    If you have access to the Apple WWDC13 session videos, there's a session on the Profile Manager that might be worth your time.

  • How do I add multiple images into one file?

    I'm sure this is something that's been covered in another post (or even in the help portal) but I think my wording in my search terms are not correct or... I don't know, because I just can't find what I'm looking for.
    I want to know how to add multiple images into one file/one image, both horizontally and/or vertically. To give you an idea of what I mean, check out :
    http://www.best10apps.com/apps/comic-story,531596060.html
    If you scroll down, you'll see a heading entitled : Screenshots of Comic Story. Notice how there's 3 pictures (divided by borders). 2 of those pictures are side by side, and 1 of them is below the first 2 pictures.
    I want to know how to add different pictures/images and put them into one picture.

    One way is to create template PSD files and populate them with your images using Photoshops scripts.
    Photo Collage Toolkit UPDATED June 12, added Picture Package Support via PasteImageRoll and BatchPicturePackage scripts.
    The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.
    There are eleven scripts in this package they provide the following functions:
    TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
    CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
    LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
    InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
    ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
    ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
    PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
    BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
    BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
    BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder
    PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
    Documentation and Examples

  • Problem with compressing 16:9 sequence into mpeg-1

    Hello,
    I am having a problem compressing from Final Cut via Compressor into an Mpeg-1 file. I shot (and edited) in 16:9 but the Mpeg-1 files keep turning out squeezed up in 4:3. I can't find any settings in Compressor to change, and I've looked in the Compressor manual but can't find any help there either. The dimensions are greyed out in the Inspector.
    I have only a limited grasp of Compressor so if anyone has the patience to explain how to fix this in words of one syllable I would be really grateful.
    Thanks in advance.

    Hello again,
    Sorry for the long pause.
    I found a way round this problem initially by copying my sequences into a new FCP 4:3 project and they automatically became letterboxed, however there was a loss of quality so I would like to try this again. Where I got up to was, when I went into the Inspector window and clicked on the Filters tab, there's nothing in there to select. There's a video tab saying 'check the box to add a Filter', but then nothing there to check - just an empty table headed 'Name'.
    Any advice on getting the filters to show up?
    Many thanks for all your help.
    Sasha

  • Help: apply different para styles to several consecutive paragraphs via script

    Hi all,
    I need to apply different para styles to several consecutive paragraphs via script, something like this (found somewhere on the net):
    var myDoc = app.documents[0];
    var mySel = app.selection[0];
    var myPStyle1 = "A";
    var myPStyle2 = "B";
    //need to add 6 more styles here:
    //var myPStyle3 = "C";
    //var myPStyle4 = "D";
    //var myPStyle5 = "E";
    //var myPStyle6 = "F";
    //var myPStyle7 = "G";
    //var myPStyle8 = "H";
    //the last style not needed in script?
    // apply 1st style to 1st paragraph
    mySel.appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle1);
    // apply styles to paragraphs after selected
    //2nd style
    mySel.paragraphs[-1].insertionPoints[-1].appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle2);
    //next style
    mySel.paragraphs[-1].insertionPoints[-1].paragraphs[0].insertionPoints[-1].appliedParagrap hStyle = myDoc.paragraphStyles.item (myPStyle2).nextStyle;
    I've tried badly, but can't find the way to extend the sequence
    Sorry, no skills in scripting yet...
    all styles have 'Next Style' option activated, but I can't use 'Apply style, then Next style' or Object styles, because I need four different sequences of those para styles:
    A-B-C-D-E-F-G-H
    A-B-D-E-G-H
    A-C-D-F-G-H
    A-D-G-H
    and I really don't want to create special clones of the same style for each sequence (Keep It Simple, they say ).
    I believe it can be done via four slightly adjusted scripts...
    any suggestions would be greatly appreciated...

    Sorry about being late to the party, I usually pick up stuff like this right away.
    How about this one?
    1. No separate scripts needed, it uses a tiny dialog where you can choose what style set to use. If I'm correct, you can press a number key on Windows to immediately select one of the items.
    2. It works down from the paragraph your cursor is in. It has nothing to do with text frames, though -- consecutive paragraphs inside a story always ignore any text frames.
    3. Extensible: you can easily change the names of the styles in the top array, and the number of style groups in the list.
    var styleLists = [
              [ "A", "B", "C", "D", "E", "F", "G", "H" ],
              [ "A", "B", "D", "E", "G", "H" ],
              [ "A", "C", "D", "F", "G", "H" ],
              [ "A", "D", "G", "H" ]
    var radiobutts = [];
    styleDialog = app.dialogs.add ({name:"Set Multiple Styles",canCancel:true});
    with (styleDialog)
              with (dialogColumns.add())
                        with (radiobuttonGroups.add())
                                  for (i=0; i<styleLists.length; i++)
                                            // Build radio button string
                                            str = "&"+String (i+1)+". ";
                                            for (j=0; j<styleLists[i].length; j++)
                                                      if (j) str += "-";
                                                      str += styleLists[i][j];
                                            radiobutts.push (radiobuttonControls.add({staticLabel:str, checkedState:false}) );
    radiobutts[0].checkedState = true;
    if (styleDialog.show())
              for (i=0; i<radiobutts.length; i++)
                        if (radiobutts[i].checkedState == true)
                                  break;
              if (i < radiobutts.length)
                        par = app.selection[0].paragraphs[0];
                        for (j=0; j<styleLists[i].length; j++)
                                  par.appliedParagraphStyle = styleLists[i][j];
                                  par = par.parentStory.paragraphs.nextItem(par);

  • Can I add specific text to Template via pop up text box on opening file?

    In most word processors it is possible to create a template that asks you for specific text when you open it, so that you can have the letter three quarters written within the template, and only need to replace names, addresses, date and so on.
    In Lotus WordPro for instance, before I even see the file, I have to fill in a dialogue box with the persons name, the subject of the letter, and four or five specifics unique to them. The WP then adds this info into the letter, and all I need do is to occasionally write a further full paragraph.
    How do I do this in Pages? I can't seem to find anyway to do it at all. I have a suspicion I might need Apple Script, but I'm not sure how I can do that. I have a book of how to code, but I don't know where to store the macro, nor to write it yet - the book's just there if I need it.
    I want to open the file, and then be asked one item at a time for the personalised answers to questions that occur in every report/letter.
    Any ideas?
    TIA
    Mac

    Thanks for your suggestions, Magnus, you really have had a good think for me - I appreciate that!
    What I am doing is report writing in which 90% of the report is the same for everyone. Except the cover page with Name and Address details, and Report title; the initial section which is the same for everyone except for specifics such as amount to invest, reason for investment, term to invest over, things like that.
    The end of the report is the recommendations section which is where I use freetext to create a bespoke solution - this cannot be automated.
    Just automating the cover page and the intro section save me huge amounts of time which I can then use on research and fund analysis, leaving the principles of investment section pretty much the same for everyone, as here I'm describing the principle and theory.
    After I created this Report Template my average report creation time went down from about 3 to 4 hours, to about 45 minutes. I guess the automation itself doesn't save as much time as the templating does, but it allows me to concentrate on the important bit and not worry if I have left something out - or in - that changes the overall thrust of the report.
    I cannot load Lotus WorpPro on Parallels, nor on Virtual PC, so the lack of automation really is a pain here. I see it as a weakness of Apple products for business, as I am sure Microsoft do which is why they have dropped VBA support for Office 2008.
    I have got NeoOffice as well as OpenOffice for Mac on my system, but really they aren't atable enough to use, and the formatting is pretty flaky. It certainly isn't completely consistent with Office itself.
    So, I am left with the conclusion that progress only means a reduction in features!
    But maybe I'm missing something?
    Mac

  • Writing commands to get specific data channels in the output report via script or automated script generation..

    In my project I have to make certain calculation and then get the data plotted in the given report template. I am using automated script for this. My script is doing all the calculations and then it not selecting and drag-dropping the selected channels on the report template. Its saving the blank report template.
    I am struggling to get the data for specific channels plotted by using the script. I need the selected channels to be plotted on this report template and then get it saved.
    Any help will be deeply appreciated. Thanks
    Solved!
    Go to Solution.

    Hi LaxG,
    Brad is absolute right. It is possible to create your whole layout via script.
    If you have loaded  the example report layout you can copy these lines to create a new line in your plot. This is the recommended object oriented way.
    call Report.Sheets("Blatt 1").Objects("2D-Axis1").Curves2D.Add(e2DShapeLine, "anyName")
    Report.Sheets("Blatt 1").Objects("2D-Axis1").Curves2D.Item("anyName").Shape.XChannel.Reference               = "[1]/Zeit"
    Report.Sheets("Blatt 1").Objects("2D-Axis1").Curves2D.Item("anyName").Shape.YChannel.Reference               = "[1]/Geschwindigkeit"
    For performance reasons it's recommended to use the it like this.
    dim oLine
    set oLine = Report.Sheets("Blatt 1").Objects("2D-Axis1").Curves2D.Item("anyName").Shape
    oLine.XChannel.Reference               = "[1]/Zeit"
    oLine.YChannel.Reference               = "[1]/Geschwindigkeit"
    Like Brad mentioned it is much easier, that you have a stored template of your report with all setings and customisations already done.
    You open this layout file and have stored the names of your calculated channels. When you are doing this with a script they always have the same name and belong to the same group.
    Now you can customize the references of the line items.
    Kind Regards,
    Philipp K.
    AE | NI Germany

  • Using a single sequence value over multiple scripts (in a variable?)

    Hi all...
    I'm writing a number of scripts that insert rows into tables.
    To better explain my point, I'll paste a simple breakdown of the scripts here as that will be easier to understand...
    Script 1:
    INSERT INTO WORKGROUP_DEPARTMENTS(ID, DEPT_NAME, DEPT_TYPE)
    VALUES (SEQ_WGDPT.NEXTVAL, 'Staff', 3);
    Script 2:
    INSERT INTO WORKGROUP_SECTIONS(ID, SECT_NAME, WGDPT_ID)
    VALUES (SEQ_WGSEC.NEXTVAL, 'Staff 1',
    (SELECT ID FROM WORKGROUP_DEPARTMENTS
    WHERE DEPT_NAME = 'Staff'
    AND DEPT_TYPE = '3')
    Script 3:
    INSERT INTO WORKGROUPS(NAME, UNIT_TYPE, WGSEC_ID)
    VALUES ('Staff Room', 3,
    (SELECT ID FROM WORKGROUP_SECTIONS
    WHERE SECT_NAME = 'Staff 1')
    As you can see, in scripts 1 and 2 a new value is produced from a sequence (SEQ_WGDPT & SEQ_WGSEC respectively). Then, in scripts 2 & 3 (respectively) these values are inserted into another table.
    What I'm trying to figure out is: can I do the same thing here without having to include the horrible SELECT statements in scripts 2 & 3 in order to find the ID, which was produced by the sequence in the previous script?
    Unfortunately they do have to be separate scripts, and as such I can't call Sequence.CurrVal from a different script as other users may have used the sequence since it was used initially in the previous script. I could call it from the original calling script, and save it intop a variable, but I have no idea how to - even if it is the right idea!
    I tried to insert the sequence value into a variable a la PL/SQL so that I could call this variable from the next script, but failed miserably as I'm rubbish!
    Any help would be great. Thanks.

    You can use PL/SQL, for example:
    SQL> desc t
    Name                                      Null?    Type
    ID                                                 NUMBER
    NAME                                               VARCHAR2(10)
    SQL> desc t1
    Name                                      Null?    Type
    ID                                                 NUMBER
    NAME                                               VARCHAR2(10)
    ID1                                                NUMBER
    SQL> desc t2
    Name                                      Null?    Type
    ID                                                 NUMBER
    NAME                                               VARCHAR2(10)
    ID2                                                NUMBER
    SQL> create sequence seq_1;
    Sequence created.
    SQL> declare
      2   prev_id number;
      3  begin
      4   insert into t values(seq_1.nextval,'A')
      5   returning id into prev_id;
      6   insert into t1 values(seq_1.nextval,'B',prev_id)
      7   returning id into prev_id;
      8   insert into t2 values(seq_1.nextval,'C',prev_id);
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> select * from t;
            ID NAME
             1 A
    SQL> select * from t1;
            ID NAME              ID1
             2 B                   1
    SQL> select * from t2;
            ID NAME              ID2
             3 C                   2
    Rgds

  • How to load data into table Using Script Task

    We have a directory/folder where we have a file. We need to insert the File Created Date , File Name , Extension into the database table of Sql server by using Script Task.
    So could you please suggest , how to frame the connection string , fetch the file details and insert the data into the database table using Script Task of SSIS 2008

    You can achieve it as follows using standard script task
    1. Add a ForEachLoop container to point to your directory to iterate though the files. Add a variable of type string inside loop to get file name of each file it iterates. Choose option Filename and extension. Add a variable to just store extension part
    (FileExtension), set EValuateAsExpression true for it and give expression as below
    SUBSTRING(@[User::FileName],FINDSTRING(@[User::FileName],".",1)+1,LEN(@[User::FileName]))
    2. Add a script task inside loop and pass filename variable as a read only variable to it. Crete a new variable to get creationdate and pass it as ReadWrite. Inside write code as below
    Public Sub Main()
    ' Add your code here
    Dim f As New System.IO.FileInfo(Dts.Variables("FileName").Value.ToString())
    Dts.Variables("FileCreatedDate").Value = f.CreationTime
    Dts.TaskResult = ScriptResults.Success
    End Sub
    3. Add a Exec SQL Task after Script task inside loop and give a query like below
    INSERT INTO TableName (FileName,CreatedDate,Extension)
    VALUES(?,?,?)
    and in parameter tab map the parameter placeholders 0,1 and 2 to @[User::FileName],@[User::FileCreatedDate] & @[User::FileExtension] variables
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to determine installed version of EMET via script?

    Hi all,
    I was not able to find a easy way to determine installed verison of EMET via script. If you can guide me in the right direction, this would help a lot.
    Many thanks
    Sam

    This is probably not the right forum for scripting questions and you didn't specify which script you (want to) use... Below you can find some examples...
    If you use VBscript you could use WMI and query the class Win32_Product:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
    Set colSoftware = objWMIService.ExecQuery _
    ("Select * from Win32_Product where Name like '%EMET%'")
    For Each objSoftware in colSoftware
    Wscript.Echo "Name: " & objSoftware.Name
    Wscript.Echo "Version: " & objSoftware.Version
    Next
    This method is not advisable because the class isn't optimized for queries and therefore the query takes a long time!
    You can also use the Windows Installer object:
    Option Explicit
    ' Connect to Windows Installer object
    Dim installer
    Set installer = Wscript.CreateObject("WindowsInstaller.Installer")
    Dim product, products
    Set products = installer.Products
    For Each product In products
    if instr(1,installer.ProductInfo(product, "InstalledProductName"), "EMET", vbTextCompare) > 0 AND instr(1,installer.ProductInfo(product, "Publisher"), "Microsoft", vbTextCompare) > 0 then
    Wscript.Echo installer.ProductInfo(product, "InstalledProductName")
    Wscript.Echo installer.ProductInfo(product, "VersionString")
    End If
    Next
    Set products = Nothing
    Set installer = Nothing
    Wscript.Quit 0
    This method enumerates all the products but be aware that you should also check the installstate because the installstate of a product also can be advertised.
    You can also use powershell to enumerate the uninstall registry keys but you have take into account that the results may be different on a 64-bit Windows and the bitness of the powershell proces:
    gci "hklm:\software\microsoft\windows\currentversion\uninstall" | foreach { gp $_.PSPath } | select DisplayVersion,DisplayName | where { $_.DisplayName -match "^EMET*" }
    You can also install and use the
    Windows Installer PowerShell Module and use this command:
    get-msiproductinfo | where { $_.Name -like '*EMET*' } | select ProductName,ProductVersion  | format-list
    On the internet you can find a lot of information about your question. For instance I found these pages:
    http://blogs.technet.com/b/heyscriptingguy/archive/2013/11/15/use-powershell-to-find-installed-software.aspx
    http://blogs.technet.com/b/alexshev/archive/2008/06/30/from-msi-to-wix-part-17-windows-installer-automation-interface-part-2.aspx
    W. Spu

Maybe you are looking for