Insert multiple text files to multiple tables that have different table structures

Hi All,
I have a small problem. I have lots of text files in a folder location. Say for an example Company.txt, Code.txt. I need to insert all these files to tables similar to the file structure. Company file to Company table and Code file to Code table. The catch
is that all these table structures differ one to another.
How can i do this using SSIS? I guess using a for each loop with some data flow task would be a start.
Can some body give me a step by step example on how i can achieve this.
Thanks
LM

It is very complicated to accomplish the above requirement using the standard Data Flow Task. You have to essentially setup a separate task for each table layout. If you can use third-party solutions, check the commercial CozyRoc
Data Flow Task Plus. It is an extension of the standard Data Flow Task, with ability to do dynamic data flows at runtime. You can load all your tables and layouts with only one Data Flow Task. The other benefit is the solution doesn't require programming.SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

Similar Messages

  • Can I add multiple devices to "Find My iPhone" that have different Apple ID's?

    I was just wondering if it was possible at all to add multiple devices to "Find My iPhone".  These devices however, have separate Apple ID's.  Is this still possible? And if so, how do I go about diong that?

    The same way you do it for one. Just repeat the steps but first log into each account to add the device connected to that Apple ID.

  • Best way to read text files at multiple production sites

    Need to write a solution to read txt files that contain binary data on multiple SQL Servers. I have no control over the SQL servers, they are not mine. Thinking of BULK INSERT or bcp. But must something on the server be turned on for it to work? What are
    some other production solutions for reading files and loading the data into a SQL table?

    Hello,
    I think the best way is create a SSIS package to import data into SQL Server tables. Here are some articles for your reference:
    http://codejotter.wordpress.com/2010/04/06/importing-multiple-text-files-using-ssis/
    http://technet.microsoft.com/en-us/sqlserver/dd941934.aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • Setting Font for converting multiple text files into PDF using VB 6.0

    Dear All,
    Am converting multiple text files into PDF using VB6.0. Currently, am unable to control the font face and size for the generated files. Below is the procedure am using for each file;
    Public Sub proc_convert_to_PDF(srcFilename As String, destFilename As String)
    Dim p_AcroApp As CAcroApp
    Dim p_VDoc As CAcroAVDoc
    Dim p_DDoc As CAcroPDDoc
    Dim IsOk As Boolean
    Set p_AcroApp = CreateObject("AcroExch.App")
    Set p_VDoc = CreateObject("AcroExch.AVDoc")
    Call p_VDoc.Open(srcFilename, "")
    Set p_VDoc = p_AcroApp.GetActiveDoc
    If p_VDoc.IsValid Then
    Set p_DDoc = p_VDoc.GetPDDoc
    ' Fill in pdf properties.
    p_DDoc.SetInfo "Title", Format(Date, "dd-mm-yyy")
    p_DDoc.SetInfo "Subject", srcFilename
    If p_DDoc.Save(1 Or 4 Or 32, destFilename) <> True Then
    MsgBox "Failed to save " & srcFilename
    End If
    p_DDoc.Close
    End If
    'Close the PDF
    p_VDoc.Close True
    p_AcroApp.Exit
    'Clear Variables
    Set p_DDoc = Nothing
    Set p_VDoc = Nothing
    Set p_AcroApp = Nothing
    End Sub
    What I need;
    1) to be able to set the font face of the destination file ( destFilename)
    2) to be able to set the font size of the destination file ( destFilename)
    Am using Adobe Acrobat 7.0 Type Library
    Kindly Help.
    Thanks in advance

    We didn't say it doesn't work. We said it isn't supported.
    There are a number of other ways to make a PDF. The one which would
    give the most control is if your application directly printed to GDI,
    controlling the font directly. This could print to Adobe PDF.
    You could look for an application that gives control of font for
    printing.
    You could use a text-to-PostScript system and distill the result. You
    could even look for a non-Adobe text-to-PDF.
    Working in the unsupported and dangerous world you chose, the font
    size for text conversion is set (and this is very bad design from
    Adobe) in the settings for Create PDF > From Web Page. There is no API
    to this.
    Aandi Inston

  • Split text file in multiple files based on a string

    Hey all,
    I want to split a text file into multiple files. I already found some examples where there is a split based on a number of files.
    http://forum.java.sun.com/thread.jspa?forumID=256&threadID=260930
    But I want to make a split based on a string (word) that I find in the file.
    Anyone that can help me ?
    Regards,
    Atmoz

    This is my testing code like it is now. Maybe there is a bug in there which causes a memory leak or so.
    public class test {
         public static void main(String args[]) {
              File sSourceDir = new File("D:\\Test\\");
              File sDestinationDir = new File("D:\\Test\\");
              File[] files = sSourceDir.listFiles(new Filter());
              for (int i=0; i<files.length; i++) {
                   File file = files;
                   if (file.isFile()) {
                        System.out.println("Splitting file: "+files[i]);
                        splitFile(file,sDestinationDir);
                   else {
                        System.out.println("Not a file: "+files[i]);
         public static File splitFile(File fSourceFile, File sDestinationDir) {
              int counter = 1;
              File fDestinationFile=new File(sDestinationDir,"NEW_"+counter+"_"+fSourceFile.getName());
              fDestinationFile.delete();
              String sLineOfData=null;
              boolean firstfile = true;
              try {
                   BufferedReader DataFileReader = new BufferedReader(new FileReader(fSourceFile));
                   PrintWriter outputStream = new PrintWriter(new FileWriter(fDestinationFile));
                   while ((sLineOfData = DataFileReader.readLine()) != null){
                        System.out.println(sLineOfData);
                        if (sLineOfData.indexOf("UNA:+") != -1) {
                             if (!firstfile) {
                                  counter++;
                                  fDestinationFile=new File(sDestinationDir,"NEW_"+counter+"_"+fSourceFile.getName());
                                  outputStream.close();
                                  outputStream = new PrintWriter(new FileWriter(fDestinationFile));
                                  outputStream.println(sLineOfData);     
                             else {
                                  firstfile = false;
                                  outputStream.println(sLineOfData);     
                        else {
                             outputStream.println(sLineOfData);
                   outputStream.close();
                   DataFileReader.close();
              } catch (FileNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              return fSourceFile;
    And this is an example of a file:
    PS: I cut out each long line (that line from 4000 chars)
    UNA:+,? '
    UNB+UNOC:3d+5499757493404:14+3014331700208:14+050114:1200+ACC302++STS.GZ++1++1'
    UNH+I15185477+UTILTS:D:03B:UN:E5BE03'BGM+E32::260+I15185477+9+NA'
    DTM+137:200501141151:203'DTM+735:?+0100:406'MKS+23'NAD+MR+3014331700208::9'
    UNA:+,? '
    UNB+UNOC:3+549975f7493404:14+3014331700208:14+050114:1200+ACC302++STS.GZ++1++1'
    UNH+I15185477+UTILTS:D:03B:UN:E5BE03'BGM+E32::260+I15185477+9+NA'
    DTM+137:200501141151:203'DTM+735:?+0100:406'MKS+23'NAD+MR+3014331700208::9'
    DTM+137:200501141151:203'DTM+735:?+0100:406'MKS+23'NAD+MR+3014331700208::8'
    UNA:+,? '
    UNB+UNOC:3g+5499757g493404:14+3014331700208:14+050114:1200+ACC302++STS.GZ++1++1'
    UNH+I15185477+UTILTS:D:03B:UN:E5BE03'BGM+E32::260+I15185477+9+NA'
    DTM+137:200501141151:203'DTM+735:?+0100:406'MKS+23'NAD+MR+3014331700208::9'Message was edited by:
    Atmozzz

  • 'No Upload Authorization' While Uploading a Text File from Multiple Select

    Hi all,
       The User is trying to upload a text file from Multiple Selection screen of a Query in BEx and it gives the error message of 'No Upload Authorization' (Error DB886).
       In 'Logon data' tab of Tcode SU01, it has 'User' for 'User Group for Authorization check' for this User.
       I could upload a text file from Multiple Selection screen with my User Id.
       An idea about this error, PLEASE ?
    Thanks,
    Venkat.

    Hi Ron,
       This User does not have the access to Tcode ST01.
       The user executed Tcode SU53 immediately following the authorization failure to see the authorization objects. The 'Authorization obj' is blank and under the Description it has 'The last Authorization check was successful' with green tick mark.
      Any further suggestions, PLEASE.
    Thanks.

  • Generating multiple text files.

    Dose anyone know how to output multiple text files using XSLT.

    Dear Rony,
    I am facing the same problem, have u got the sollution. if u resoled please let me know.
    requesting you
    Thanks&Regards
    Srini

  • Read multiple text files and sort them

    I am trying to read multiple text files and store the data from the file in vector.
    but for days. I am with no luck. anyone can help me out with it? any idea of how to sort them will be appreciated.
    Below is part of the code I implemented.
    public class packet {
        private int timestamp;
        private int user_id;
        private int packet_id;
        private int packet_seqno;
        private int packet_size;
        public packet(int timestamp0,int user_id0, int packet_id0,int packet_seqno0, int packet_size0)
            timestamp = timestamp0;
            user_id=user_id0;
            packet_id=packet_id0;
            packet_seqno=packet_seqno0;
            packet_size=packet_size0;
        public void setTime(int atimestamp)
            this.timestamp=atimestamp;
        public void setUserid(int auserid)
            this.user_id=auserid;
        public void setPacketid(int apacketid)
            this.packet_id=apacketid;
        public void setPacketseqno(int apacketseqno)
            this.packet_seqno=apacketseqno;
        public void setPacketsize(int apacketsize)
            this.packet_size=apacketsize;
        public String toString()
            return timestamp+"\t"+user_id+"\t"+packet_id+"\t"+packet_seqno+"\t"+packet_size+"\t";
    }Here is the data from part of the text files. ( the first column is timestamp, second is userid, third is packetid.....)
    0 1 1 1 512
    1 2 1 2 512
    2 3 1 3 512
    3 4 1 4 512
    4 5 1 5 512
    5 6 1 6 512
    6 7 1 7 512
    7 8 1 8 512
    8 9 1 9 512
    9 10 1 10 512
    10 1 2 11 512
    11 2 2 12 512
    12 3 2 13 512
    13 4 2 14 512
    14 5 2 15 512
    15 6 2 16 512
    16 7 2 17 512

    Here's a standard idiom for object-list-sorting:
    /* cnleafdata.txt *********************************************
    0 1 1 1 512
    1 2 1 2 512
    2 3 1 3 512
    3 4 1 4 512
    4 5 1 5 512
    5 6 1 6 512
    6 7 1 7 512
    7 8 1 8 512
    8 9 1 9 512
    9 10 1 10 512
    10 1 2 11 512
    11 2 2 12 512
    12 3 2 13 512
    13 4 2 14 512
    14 5 2 15 512
    15 6 2 16 512
    16 7 2 17 512
    import java.util.*;
    import java.io.*;
    public class Packet implements Comparable<Packet>{
      private int timeStamp;
      private int userId;
      private int packetId;
      private int packetSeqno;
      private int packetSize;
      public Packet(int timeStamp0, int userId0, int packetId0,
       int packetSeqno0, int packetSize0) {
        timeStamp = timeStamp0;
        userId = userId0;
        packetId = packetId0;
        packetSeqno = packetSeqno0;
        packetSize = packetSize0;
      public Packet(String timeStamp0, String userId0, String packetId0,
       String packetSeqno0, String packetSize0) {
        this(Integer.parseInt(timeStamp0), Integer.parseInt(userId0),
         Integer.parseInt(packetId0), Integer.parseInt(packetSeqno0),
         Integer.parseInt(packetSize0));
      public Packet(String[] a){
        this(a[0], a[1], a[2], a[3], a[4]);
      public void setTime(int aTimeStamp){
        timeStamp = aTimeStamp;
      public void setUserId(int aUserId){
        userId = aUserId;
      public void setPacketId(int aPacketId){
        packetId = aPacketId;
      public void setPacketSeqno(int aPacketSeqno){
        packetSeqno = aPacketSeqno;
      public void setPacketSize(int aPacketSize){
        packetSize = aPacketSize;
      public int getUserId(){
        return userId;
      public String toString(){
        return String.format
    ("%2d %2d %2d %2d %4d", timeStamp, userId, packetId, packetSeqno, packetSize);
      public int compareTo(Packet otherPacket){
        return userId - otherPacket.getUserId();
      /* main for test */
      public static void main(String[] args){
        String line;
        ArrayList<Packet> alp;
        alp = new ArrayList<Packet>();
        try{
          BufferedReader br = new BufferedReader(new FileReader("cnleafdata.txt"));
          while ((line = br.readLine()) != null){
            // if (! recordValid(line)){
            //   continue;
            String[] ar = line.split("\\s");
            alp.add(new Packet(ar));
        catch (Exception e){
          e.printStackTrace();
        System.out.println("[original]");
        for (Packet p : alp){
          System.out.println(p);
        System.out.println();
        Collections.sort(alp);
        System.out.println("[sorted by user ID]");
        for (Packet p : alp){
          System.out.println(p);
    }

  • Scheduling multiple tab BO XI3 report needs to save into multiple text file

    Hi,
    I have BO XI 3 Desktop Intelligence reports, those reports contains multiple tabs. Once after scheduling these reports the output needs to save as different text files (each tab as separate text file). Generally when select output as text file we will get the text file with the data of current tab, but in this scenario I want all the tabs data into different text files. I guess we can do this with macro. But I am not good in macro development, hope somebody can help me.
    Could you please help out for the same!
    Thanks,
    Rama

    Thanks Dan.. I made chenges in code as per your suggestion.. its working fine in DeskI -> local PC
    But this is not working in InfoView level... when i scheduled the same report its not saving into multiple text files... can you please have look...
    macro code as follows:-
    Public Sub SaveAsText()
    Dim StrTxtPath As String
    Dim BusDoc As busobj.Document
    Set BusDoc = ThisDocument
    Dim BusRep As Report
    Dim I As Integer
    On Error GoTo ErrHandler
    'StrTxtPath = "
    xxxx.xxx.xxx.com\common\Reporting\"
    StrTxtPath = "D:\Business Objects\Test_Macro\"
    For I = 1 To BusDoc.Reports.Count
    Set BusRep = BusDoc.Reports.Item(I)
    BusRep.ExportAsText (StrTxtPath & BusRep.Name)
    Next I
    ErrHandler:
    Exit Sub
    End Sub
    When i run this macro through DeskI.. its saving the report as multiple .txt files with respective number of tabs... but the same thing is not working when i tried in scheduling...
    Can you please suggest me what are the changes needs to be done...
    Thanks in Advance
    Thanks,
    Rama

  • How to Apply adjustment layers to multiple layers that have different blending modes ...

    How to Apply adjustment layers to multiple layers that have different blending modes  and keep the colours the same as the adjusment done?
    I work in Animation painting Backgrounds.  My files are sometimes upwards to 200+ layers.
    I will use adjustment layers to quickly balance colours and constrast on top of those many many layers.
    The only way that I know of how to apply adjustment layers it to every single layer  ( by applying I mean I need to get rid of the adjustment layers because we cant use them in production but i need the new colours be applied to all layers underneath ) in a psd is to manually do it By duplicating the adjusment layer 200+ times and  then merging each layer to one of those adjustment layers so that that layer can take the adjustment layers effect permanently.
    The issue is that Within Those 200 layers I have some layers set to Multiply or OVERLAY.    IT obviously wont apply the adjustment layer properly to those layers because those layer blend mode affect the layers under them. The colour wont be the same anymore in the spots that had the multiply blended mode.
    HEres an example of a simple File.  to show what i mean.
    https://dl.dropboxusercontent.com/u/3408266/ball%20layers.jpg
    https://dl.dropboxusercontent.com/u/3408266/ball.psd
    I have 2 adjustment layers up top.  I need to get rid of them by applying them to each layer! I cannot merge any of the layers. We need all those layers for production.
    I can apply the adjustment layers manually and this works GREAT for all Layers set to normal.  THey take on the colour change just FINE.
    However, The issue is that layer 6 and layer 4 are both set to mutiply and this screws up the colour once i apply the adjustment layers to each layer manually...
    How can i apply my adjustment layers to a file like this with some layers being set to multiply while keeping the layers exactly the same configuration  and The new colour taking efffect exactly how i looks before i apply the adjustment layers?
    Now the simple solution is to merge the multiply layers to the layer that it affects HOWEVER I NEED those multiply layers to be seperate! 
    I'm assuming what I want to do is impossible? Hope this isnt confusing.  As far as i know its impossible to do what I want it to do.  but just wanted to ask and see.
    I would REALLY REALLY love to talk to a adobe programmer/ technician/pro working at adobe about this.  Theres just no way to get in touch with anyone... =(
    any thoughts ?

    Sure... if you want to put it that way. Either way its not the desirable outcome. 
    its just frustrating that theres no way to apply adjustment layers to hundreds of layers while keeping them in the same configuration ( blendmodes,  layer order ,  without merging)  while keeping the same end result.
    works great if all your layers are set to normal though..    But I really need to keep shadow layers seperately and be able to adjust on the fly aswell as apply those adjusment to all my layers.
    I suppose that just isnt possible.   I understand the math required for this would be tremendous/ complicated if something like this would ever be implemented.  Would be nice if adobe could come up with some solution to this.  Its really a huge issue in my work flow and theres no alternatives.    How else can I adjust colours to 100+ layers  with a few clicks that lets me play around the the adjustment until im happy with the outcome.    Really wish i could adjust and the quickly apply that adjustment to all my layers regardless of blend mode.   LIke If the Layers with blendmode could somehow take the properties of the adjustment layer and keep adjusting those layers undereathe on top of that blended mode that its doing...   

  • I subscribed to iTunes Match and would like to sync my music on multiples devices that have different Apple IDs within the same iCloud family.

    I subscribed to iTunes Match and would like to sync my music on multiples devices that have different Apple IDs within the same iCloud family.
    Can someone indicate the way to proceed?
    Thanks.

    Hi,
    You can't use family sharing or multiple Apple IDs with iTunes match.
    ITunes match is only attached to Apple id that you used to subscribe.
    Jim

  • How to improve Oracle Veridata Compair pair performance with tables that have big (30-40MB)CLOB/BLOB fileds ?

    How to improve Oracle Veridata Compair pair performance with tables that have big (30-40MB)CLOB/BLOB fileds ?

    Can you use insert .. returning .. so you do not have to select the empty_clob back out.
    [I have a similar problem but I do not know the primary key to select on, I am really looking for an atomic insert and fill clob mechanism, somone said you can create a clob fill it and use that in the insert, but I have not seen an example yet.]

  • JOIN 2 tables that have same column ?

    I need to learn how to join two tables that both have the same column name:
    tbl1 - idskey
    tbl2 - idskey
    the idskey column holds a id_number
    When I do the JOIN I would like to make sure that only Distinct records are joined from both tables and that any duplicates are removed in the final join. So if:
    Tbl1 has a idskey of: 12345
    and
    Tbl2 has a idskey of: 12345
    In the final JOIN I want to remove one of those duplicates.
    I actually need to join 3 tables that have the same linking column names for the join, but if I learn how to do this correctly on 2, that will be a start.
    10g for db, thanks!

    Hi,
    SELECT DISTINCT and GROUP BY are the most common ways to get unique results from non-unique keys. Exactly how you use them depends on exactly what you want to do.
    SELECT DISTINCT guarantees that no two rows in the result set, conisdering all columns, will be identical.
    GROUP BY produces one row from a set of rows that have a common feature. The values on that row may be a composite of values from various rows in that set (e.g., an average).
    Please post a small, specific example. For instance:
    "I have two rows in tbl1 ...
    and these fhtee rows in tbl2 ...
    Notice how there is one row with idskey=12345 in tbl1 but two such rows in tbl2.
    How can I get theses results ...
    where only one row has idskey=12345?"

  • Shadow tables that have been created via the new partitioning schema

    Hi,
         Complete Partitioning :
                    In a complete partitioning, the fact table of the infocube are fully converted using shadow
    tables that have been created via the new partitioning schema.
                   in the above Explanation what is the meaning of shadow tables which perform the
                   partitioning of an info cube.

    Hi
    Shadow tables have the namespace /BIC/4F<Name of InfoCube> or /BIC/4E<Name of InfoCube>.
    Complete Partitioning
    Complete Partitioning fully converts the fact tables of the InfoCube. The system creates shadow tables with the new partitioning schema and copies all of the data from the original tables into the shadow tables. As soon as the data is copied, the system creates indexes and the original table replaces the shadow table. After the system has successfully completed the partitioning request, both fact tables exist in the original state (shadow table), as well as in the modified state with the new partitioning schema (original table). You can manually delete the shadow tables after repartitioning has been successfully completed to free up the memory. Shadow tables have the namespace /BIC/4F<Name of InfoCube> or /BIC/4E<Name of InfoCube>.
    You can only use complete repartitioning for InfoCubes. A heterogeneous state is possible. For example, it is possible to have a partitioned InfoCube with non partitioned aggregates. This does not have an adverse effect on functionality. You can automatically modify all of the active aggregates by reactivating them.
    Hope it helps and clear

  • How can i indicate that the table columns have different size?

    How can i indicate that the table columns have different size?
    It is because i have a table that has several columns....but i would like to have the possibility to indicate the size for every column....could somebody help me please?
    Thanks,
    Mary

    Hi,
    don't know as much as I should about JTable, but it seems that using yourTable.getDefaultRenderer() could help you: if I clearly understood the javadoc notes, it returns an object inheriting from JLabel, so you should be able to use setHorizontalAlignment(int align) on it... no time to verify this, but I'd be thankfull if you tell me the results !!!
    Regards

Maybe you are looking for

  • How can I move pictures from my PC to iPod?

    How can I put pictures that I have on my PC onto my iPod Touch? iTunes doesn't do it.

  • Can't find my ipod playlist on the sourcelist to update my music?

    I previoulsy had my setting as manual sync due to having more music that will fit on my ipod. I have not updated for sometime but for some reason my ipod playlist is no longer there and i can't update it? any ideas on what i need to do?

  • "The unit chosen is not supported."

    I get the msg: "The unit chosen is not supported." (Adobe error message)  when I attempt to retrieve a scanned image from the Xerox Scan Utility window that appears in Adobe Acrobat after I have scanned the document. I can open MS Visio and retrieve

  • Eroor in eclipse when i have run TOMCAT in debuge mode web service debuging

    hello all, i have a serious problem with debug my web service. I set local variable in eclipse (-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000). And now if i run TOMCAT in normal mode all worked f

  • LSMW data Reading Error

    HI, In the LSMW process i am getting the below error while doing 9th step Reading data. Unable to write to file 'E:\Z1XK01_ZXK01_ZXK01.lsmw.read' Message no. /SAPDMC/LSMW804 Rgds Mani