Extract data from variable

Hi
I'm running this query in execute sql task and storing the result set in a variable.
select FirstName, LastName, Email
from dbo.Employee where employeeID = ?
Now how to load this result set stored in a variable into a destination (flatfile/olebd).
Royal Thomas

We can read a variable of datatype Object using For each loop container by setting the "Enumerator" as "Foreach ADO Enumerator".
Follow the step. First create a variable "MyOutput" of datatype "Object". Another variable say "Email" of type string.
Add execute SQL Task. Set the result set property as "Full Result Set". Set connection property and SQL Statement. Note that the email field in your query is at 3rd position.
Add Foreach Loop container, under collection property set the enumerator as "Foreach ADO Enumerator". Select the variable "MyOutput" under ADO Object source variable. The enuneration mode is "Rows in the first table".
Supply the "Email" variable of string datatype in the Variable mapping tab and the index as 3.
Finally inside the Foreach loop we can add a dataflow task whose source is OLEDB Source and Data access mode is SQL Command and having parameter. Mapped the parameter to "Email". While setting destination say Flat File destination do not forget
to uncheck "Overwrite data in flat file".
Regards, RSingh

Similar Messages

  • Extracting data from Variable using embedded Java

    I am reading a file from a File Adapter and using a variable to get the File Name. This file is being copied to another folder using File Adapter with the same name.
    Now I want to use this File Name in Embeded Java code to encrypt the file. But I am not able to extract the File Name. I am using the following code;
    String getFileName = (String)getVariableData("FileName_In","inboundHeader","/ns4:InboundFileHeaderType/ns4:fileName");
    When I execute it does not throw any error but does not do anything. Any help would be appreciated.

    Hi,
          apache POI is working, and I have extracted the <b>text</b> in a word document(MSWord <b>2003</b>).
    But it is not working for MS Word <b>2007</b>. ( The client may use any MS Word format)
    I have an other option,
    <b>Word Document -
    (Convert)-----> XML Document -(XML Parser)--
    > Data(Text, images,etc,...)</b>
    I request suggestions and idea on this.
    Thanks,
    Prabhakar.

  • Extract data from Essbase with HAL to a flat file

    Hello,
    I would like to extract data from Essbase with HAL.
    I use the essbase Adapter with the "Extract Data" Method.
    All is working when I use only the essbase Adaptater and configure it.
    But I want to have a variable on my Years dimension.
    I have to fill "Years member port" and "Years Criteria port" of my essbase Adapter with variable.
    I have a "v_year" and "v_year_criteria" variable. I fill "v_year" with "FY05" but I don't know how fill my "v_year_criteria" variable.
    Thanks a lor for answer.

    If you are in 9.3x, I would recommend using the DATAEXPORT calc script function. You just FIX on what you want to export (including substitution variables), and then fill in some parameters and it writes a file. Look in the DBAG.

  • Extract data from Query to a Flat File - scheduling in the background

    Hi All,
    We need to extract data from a query to a flat file periodically, but each time 10 separate executions based on 10 profit centers, to get the separate files.
    So, we have PC1, PC2, ... PC10 Profit centeres.
    We have Query1, with profit center variable.
    We have created 10 variants for Query1 so that we can execute for 10 profit centers.
    Now, we have used RSCRM_BAPI to execute the Query1 and write to a flat file. Now we are having a problem in getting this feature used to execute the query automatically for 10 different varaints.
    Thanks in advance,
    _ Shashi

    Shashi,
       You can try using Information Broadcasting or Reporting Agent. You can schedule this in Information Broadcasting.
    check this link for Information Broadcasting... <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/a5/359840dfa5a160e10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/a5/359840dfa5a160e10000000a1550b0/content.htm</a>
    Nagesh Ganisetti.

  • Extracting data from Excel To Illustrator javascript or vbscript

    Hi all-
    I was wondering if there was a way to extract data from Excel to be used in Illustrator. I know there is an option of variables and xml, and I don't want that. I've seen and tried out how to read illustrator and write to excel, and I get that.  What I would like to do is pretty much the opposite:
    1.Pre-fill in an Excel file(.xls,.csv, doesn't matter) with data such as a filename in column 1 and (Replacement Text) in column 2 and close manually.
    2. Run script(VBSCRIPT,Javascript, doesn't matter)
    3.For each column in Excel file where cell in first column is not empty, open Illustrator Template with placeholder of "DWG" textframe and replace the frame titled "DWG" with Replacement text from Excel in Column2.
    4, Save each to a PDF file and name file with text from Excel Column1(Filename)
    In a nutshell, there will be a single illustrator template with a premade textFrame with a name of "DWG". Excel will contain two columns, one for the filename to be named and one for the relative text to replace with the placeholder in AI. I hoped I explained this well enough without causing too much confusion. Thanks in advance.
    Filename
    Replacement Text
    test1.pdf
    DWG01
    test2.pdf
    DWG02
    test3.pdf
    DWG03
    test4.pdf
    DWG04

    As text… \n is new line character and \r is return character. I can't remember which excel uses but they both equate to a line/paragraph… I very quickly threw together an example for you…
    #target Illustrator
    textToPDF();
    function textToPDF() {
              if ( app.documents.length == 0 ) { return; }
              var doc, csvFile, i, fileArray, opts;
              csvFile = File( '~/Desktop/ScriptTest/Test.csv' );
              if ( !csvFile.exists ) { return; }
              fileArray = readInCSV( csvFile );
              doc = app.activeDocument;
              opts = new PDFSaveOptions();
              opts.pDFPreset = '[Press Quality]';
              // Here we loop the main array
              for ( i = 0; i < fileArray.length; i++ ) {
                        // Here we get the second item of sub array i
                        doc.textFrames.getByName( 'DWG' ).contents = fileArray[i].[1];
                        // Here we get the first item of sub array i
                        doc.saveAs( File( fileArray[i].[0] ), opts );
    function readInCSV( fileObj ) {
              var fileArray, thisLine, csvArray;
              fileArray =[];
              fileObj.open( 'r' );
              while( !fileObj.eof ) {
                        thisLine = fileObj.readln();
                        csvArray = thisLine.split( ',' );
                        fileArray.push( csvArray );
              fileObj.close();
              return fileArray;
    I haven't tested it but it should be close…?

  • Extract data from Pipe Delimited file

    Hi everybody,
    Could someone provide me the command to extract data from a pipe delimited file ("|") using Open/Read Data set.
    I mean eliminating the delimiter ("|") and just picking the data.
    Thanks
    M

    Here you go.. this code snippet parses the input file record by using pipe (variable lv_pipe) as separator, for tab separated file you can use lv_tab like wise...
      TYPES: BEGIN OF ts_field,
               field(50) TYPE c,
             END OF ts_field,
             tt_field TYPE TABLE OF ts_field.
       DATA: ls_record TYPE string,
            ls_input_data TYPE ts_input_data,
            lv_tab TYPE x VALUE '09',
            lv_pipe TYPE C VALUE '|',
            ls_field TYPE ts_field,
            lt_field_tab TYPE tt_field,
            lv_field_index TYPE syindex,
            lv_record_no TYPE syindex.
      FIELD-SYMBOLS: <fs_field> TYPE ANY.
      OPEN DATASET fv_file_path IN TEXT MODE FOR INPUT.
      IF sy-subrc = 0.
        DO.
          lv_record_no = lv_record_no + 1.
          READ DATASET fv_file_path INTO ls_record.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            SPLIT ls_record  AT lv_pipe INTO TABLE lt_field_tab.
            CLEAR: lv_field_index, ls_input_data.
            LOOP AT lt_field_tab INTO ls_field.
              lv_field_index = lv_field_index + 1.
              ASSIGN COMPONENT lv_field_index OF STRUCTURE
                ls_input_data TO <fs_field>.
              IF sy-subrc = 0.
                <fs_field> = ls_field-field.
              ENDIF.
            ENDLOOP.
            APPEND ls_input_data TO ft_input_data.
          ENDIF.
        ENDDO.
        CLOSE DATASET fv_file_path.

  • Need to pre-populate and Extract data from static PDF form

    Hi Jasmin or Jayan or anyone else that can answer.
    I have a requirement to use Digital Signatures.  Because of that, the forms must be static PDFs and the form variables will be “document form”.  I want to pre-populate the form via an SQL query and custom render process and render it as PDF so that the submitter can apply a digital signature when he/she is done and ready to submit for approvalSubsequent approvers will also digitally sign the form.  I know that I will specify the custom render to render only once and thereby preserve the signature(s) on the form.  I do, however, need to extract data from the form to control the business process.  I cannot access the data in the form the same way I do with an xdp and I also cannot pre-populate the same way I do with an xdp. 
    Any suggestions on how to attack this?

    Parth, one problem with your approach is he will submit PDF and therefore you won't be able to put the PDF in a variable that's suppose to contain just xml.
    The prepopulation should be the same. If you start off with an xdp, then you will call a render service that merges data with your xdp to create a PDF.
    Now when you submit, you will submit the entire PDF back in the Document Form variable. In Workbench, you can use the FormDataIntegration service to extract data from that PDF that's being stored under Document Form var/object/document and put it in an xml variable. Then you can just use xPath to do your condition.
    I'm assuming you'll just pass that same Document Form variable to the next step, because if you do any change to the PDF it'll brake the signature.
    Let me know if I missed anything.
    Jasmin

  • Hi i am new to labview. i want to extract data from a text file and display it on the front panel. how do i proceed??

    Hi i am new to labview
    I want to extract data from a text file and display it on the front panel.
    How do i proceed??
    I have attached a file for your brief idea...
    Attachments:
    extract.jpg ‏3797 KB

    RoopeshV wrote:
    Hi,
    The below code shows how to read from txt file and display in the perticular fields.
    Why have you used waveform?
    Regards,
    Roopesh
    There are so many things wrong with this VI, I'm not even sure where to start.
    Hard-coding paths that point to your user folder on the block diagram. What if somebody else tries to run it? They'll get an error. What if somebody tries to run this on Windows 7? They'll get an error. What if somebody tries to run this on a Mac or Linux? They'll get an error.
    Not using Read From Spreadsheet File.
    Use of local variables to populate an array.
    Cannot insert values into an empty array.
    What if there's a line missing from the text file? Now your data will not line up. Your case structure does handle this.
    Also, how does this answer the poster's question?

  • How to Extract Data from SAP and Load it into Essbase

    Hi All,
    Can you recommend some ways to extract data from SAP and load it into Essbase?. I have no knowledge about SAP, not sure how I can perform this task. Can I use ODI for this job?
    Thanks

    hi,
    Not sure if this helps but give a try
    you can create connection from EAS to SAP .. using a plug-in .. if you have access to oracle Support go for [ID 968961.1]
    or
    below are steps
    1. In EASPATH\console, open components.xml in a text editor.
    2. Under <PluginList>, enter <Plugin archiveName="SAP" packageName="com.essbase.eas.sap.ui"/> before the closing </PlugIn> tag.
    3. Save and close the file.
    4. In EASPATH\console\bin, open admincon.lax in a text editor.
    5. Search for lax.class.path= and append ;..\lib\sap_client.jar;..\lib \sap_common.jar to the entry. Save and close the file.
    6. In EASPATH\server\bin, open adminsvr.lax in a text editor.
    7. Search for lax.nl.java.option.additional, and append -DRFC_INI=EASPATH\server\saprfc.ini. Save and close the file.
    8. Create a new environment variable, RFC_INI, with a value of EASPATH\server\saprfc.ini
    9. Copy librfc.dll andsapjcorfc.dll to EASPATH\server\bin. You may need to obtain these files from SAP.
    let me know if it works :)

  • Extract data from a scanned PDF Chart

    Hi,
    I have a scanned PDF chart, which shows linear relationship between two variables. Is there a way to extract data from the scanned PDF using Acrobat?
    I want to avoid error in my calculations by eyeballing the data. Using "Measuring tool" may be an option, but wanted to ask whether any forum members have a better and efficient way to extract data, which can later be used in a spreadsheet software.
    As an example, please refer to the attached link, I will like to extract data from Figure 6 in this document: http://www.seas.columbia.edu/earth/wtert/sofos/nawtec/nawtec13/nawtec13-3164.pdf
    FYI, I have Acrobat X installed on my Windows computer.
    Thanks in advance for your help.

    Using AA9 Pro I was able to use the TouchUp Object Tool, right click and open the graph in Photoshop. From there, or Paint and another image editor, one might be able to clean it up or re-create the paths. The gray values are too close for it to be simple.
    The measure tool does not seem a good choice; although you see measurement lines, it would not actually produce the line you desire, until maybe, just maybe you flattened annotations, a feature within Fixups, perhaps limited to the Professional version.
    IMO, it is a fairly linear graph with only a variation at the 10 Power (MW). You eyeball is as good as mine at this one; the actual values may be available from the authoring entity.

  • Extracting data from a pdf form

    Hi,
    livecycle es2, workbench 9.0
    I'm new to workbench and have a problem extracting data from a pdf form submitted to a short lived process.
    I have set up the following very simple process :
    default startpoint >  ProcessForm > exportData > set value > set value > Write Document
    The intention is to update the document and write it to disk. So far, each step works except for the 'export data' where I cannot get the pdf to extract to xml.
    The Input to the 'export data' step is a variable (myDoc), Data Type: Document,  created from the incoming PDF form.
    If I write out myDoc it is an exact copy of the incoming document, so I guess the start and finish steps of of the process are OK.
    The incoming (PDF) form I was given had no data schema, but  I thought I could access the form data by exporting to an xml variable....
      Service : FormDataIntegration  / exportData
    input (PDF Document)    variable : myDoc
      output(Data extracted)     variable : myXMLData
    Then in the next step (set value) access the xml element I am after ..
    Mappings
    Location:  /process_data/@groupId      Expression: /process_data/myXMLData/xdp/datasets/data/form1/mainPage/groupId
    This is did not work, so I got the incoming form, exported the form data to an xml file,  and created a schema using  Stylus Studio. I then imported that into the myXMLdata definition. ( BTW - Do I need to specify the root node after importing it ? )
    Still not working !
    Extra info : The XML view of my incoming  form shows I have a minimal dataset definition- is this OK ??
    <connectionSet xmlns="http://www.xfa.org/schema/xfa-connection-set/2.8/">
       <?originalXFAVersion http://www.xfa.org/schema/xfa-connection-set/2.4/?></connectionSet>
    <xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
       <xfa:data xfa:dataNode="dataGroup"/>
    </xfa:datasets>
    The schema created by stylus studio has none of the xfdf, xfa settings I have seen on other schemas - is this OK ?
    Any help to get this fixed greatly appreciated
    thanks
    steve

    hey thanks for the offer, but I am now sorted after I found a simple working example on line.
    This is a similar process to the one I am working on, and is clearly described and easy to follow...
    http://eslifeline.wordpress.com/2009/04/25/extracting-data-from-signed-pdf-using-livecycle -server/
    girish bedekar - I thank you !

  • SSIS 2014 - Best way to use parameters to extract data from sources

    Hi,
    Is there any way besides SQL COMMAND FROM VARIABLE that I could use to extract data from Oracle \ SQL Server tables that filters the amount of data?
    For instance, I want to extract in all sources data beyond 2007 so I wanted to use this year as a parameter in all OLEDB sources I will be using.
    Thank you

    Hi Pedro,
    Based on my research, the Microsoft OLE DB provider for Oracle and Oracle Provider for OLEDB does not allow parameterized queries in OLE DB Source. So the best method to achieve your requirement is still using SQL COMMAND FROM VARIABLE option as Data access
    mode.
    Considering construct your query in a variable which you can include your parameter dynamically with another variable and set the variable properties "EvaluateAsExpression" to true. In the Expression Property set the value to:
     "select * from test
    where Col1='" + (DT_WSTR,100) @[User::para]  +"'"
    The following two similar threads are for your references:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/97f23ef5-35ac-466e-87d9-69edac2525f9/ssis-oledb-source-problem
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/32a70752-adab-4180-8b6d-f6100b3e356c/pass-variable-for-ole-db-source-with-connection-to-oracle
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Unable to extract data from an AS/400 system.

    Hello experts.
    We are trying to extract data from an AS/400 system but not having any success until now.
    I´ll write down you the stepts that we have followed until now:
    1.- Create a DB Connect between both systems
    2.- Create a Source System from AS400 in the workbench under DB Connect Directory
    3.- Generate datasources from tebles specified in the schema of the connection
    break point -
    At this point, we had a problem with some tables with at least one fieldname containing character "Ñ".
    After asking some possible solutions to SAP, the told us this is not supported, as the system can´t have any object with character "Ñ", so the transfer structure was unable to activate with this fields in the datasource.
    --- end of brek point --
    4.- After those issues, we´ve decided to implement, in another schema, views from those tables which had the fieldnames with that character "Ñ", changing them to an "N".
    5.- We´ve created another source system with that schema, and user than can see that schema.
    6.- To be able to see those views, in transaction RSDBC, we had to deactivate the two checkboxes in the first window ( Choose tables and Choose views) .
    7.- Right afeter, we could generate correctly the datasources from this logical tables.
    8.- We have designed  the hole dataflow for this datasources and everithing went rigth.
    9.- But wen we tried to execute the infopackage to extract data from those logic tables, we cannot get any registers. Acctualy the charge remains yellow after the job have finished.
    Please, I would appreciate any help you could give us on this problem.
    Thank you very much
    Regards
    Joaquin

    I´d like ti add something to this thread, and maybe clarify a littel bit the question.
    The only way that the BW system recognizes those logical tables, through transaction RSDBC is checking out the two boxes on this transaction, "Select Tables" and "Select Views".
    I don´t know haw these logical tables have been created, bus does this mean that the are not neither tables or views as BW understand them.
    Please, if someone knows anythin about this, answer to this thread.
    Thank you very much.
    Joaquin Sobrido

  • Extracting Data from APO PP/DS to BW

    Hi Gurus,
    I'm trying to extract data from APO PP/DS (SCM 5.1) to BW (BI 7.0). I'm new to SCM and am not sure how the extraction from SCM to BI happens other than that we need to read data from LiveCache.
    The extractor we are interested are
    0APO_PPDS_RESCAPREQ_01
    0APO_PPDS_PROD_CUST_01
    0APO_PPDS_OPERATION_01
    0APO_PPDS_ORDER_01
    Pls kindly help me out with the procedure.
    Thanks in advance.

    Hi
    Have a look at the below urls..
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f229690-0201-0010-84ba-9ee5a8958a05
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4fe5d590-0201-0010-6c8d-ada86492cf11
    Re: APO to BW Design Question
    Re: APO BW Integration
    Hope it helps
    Thanks
    Teja

  • What key fields should i set in DSO extracting data from 2LIS_02_ITM

    hi experts
    i extract data from 2LIS_02_ITM into a DSO, i know the DSO isn't a must, becoz the 2LIS_02_ITM delta type is ABR, but i want to keep the info in change log.
    so, what the key fields should i set in the dso? just ebeln and ebelp is enough?
    hunger for ur advice and thanks a lot!

    If you extract ITM toa DSO you cannot maintain a log of every change....the data will come ....but when the data must be activated the reference of the ebelp ebeln will remain only a single record....if you want to maintain all the data you must create another field in extractor with you can difference all the changes for one single ebelp ebeln...
    Regards

Maybe you are looking for

  • How do i add a new page to my already existing pages template document?

    help i'm really confused and in a hurry! I am working on something using a template, but it doesn't have enough pages, but i can't add a new one.

  • Can't find iTunes library

    I have been using a 2007 MacPro laptop, using OSX 10.6.4 for several years. I have my Itunes library on an external hard drive. I purchased a new MacPro laptop recently with 10.7.3. Both seem to be using Itunes 10.6. When I plug in the external hard

  • Repeated Colunm Name (Report 6i)

    Dear all I have design a report. Report query is given below: Select User_Name, Loggon_date, Loggon_Time, Logoof_date, Loggoff_Time from Log where Loggon_date between :p_from_date and :p_to_date; In report setting i set Group by User_Name. Now when i

  • Laptop died. lost outlook. need to sync contacts from phone.

    I lost a lot of outlook data (messages, calendar, tasks, and contacts) when my laptop died. I tried to sync the phone, but I am afraid that it will wipe out my contacts on the phone, too. I can't be without them. I also wondered if I could somehow ba

  • Apps crash when they load maps!

    Every time an app has to load a map (Facebook when people have checked in, or rightmove when selecting show on map option), it crashes or freezes. The maps app works fine...please help