Is there a way to Insert Data into a Lookup Column Type on a SharePoint List Destination in SSIS?

Greetings.
I have successfully worked out inserting SQL data (2008 R2) into my 2010 SharePoint list (New, Update, Delete) by creating an SSIS Data Flow Task as outlined here:
http://fsugeiger.blogspot.com/2010/01/synchronise-sql-table-with-sharepoint.html
However, the problem I am running into is inserting data into the SharePoint Columns that are "Lookup" column types. I verified that all of the values I am copying from SQL into the SharePoint lookup column exist in the customn list it is pointing to. It
is important to have this column be a lookup column as it links to another custom list that has many more columns of related information.
I have read and re-read the SharePoint SSIS Adapters 2011.docx from
http://sqlsrvintegrationsrv.codeplex.com/ and the only section that seems to apply is this:
"Looking Up Values in a SharePoint List
If you have to look up a value in a SharePoint list, you can use the Lookup transformation in your data flow, and use the SharePoint List source to load the lookup table. You may have to add a Derived Column transformation or a Script component that splits
data in the lookup column on the ";#" delimiter to separate the ID value from the description.
If you are replacing values in your data with the values that you look up in the list, then loading the changed data back into SharePoint, you only have to include the ID from the lookup column. SharePoint ignores the description if you include it."
I am not sure if the above statement means that I should be passing the assocaited ID's other than the actual data into the SharePoint List destination. If that is the case, that will not really work as the lookup contains hundreds of rows. Not too mention
I have several of these lookup column types pointing to several different lists.
Any guidance in how I can put data into a SharePoint Lookup column type via Data Flow Task would be so much appreaciated.
Thank you.
My errors are:
Error: 0x0 at Data Flow Task, SharePoint List Destination: Error on row ID="1": 0x1 - Unspecified error, such as too many items being updated at once (batch), or an invalid core field value.
Error: 0xC0047062 at Data Flow Task, SharePoint List Destination [1903]: Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.PipelineProcessException: Errors detected in this component - see SSIS Errors at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.ProcessInput(Int32
inputID, PipelineBuffer buffer) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "SharePoint List Destination" (1903) failed with error code 0x80131500 while processing input "Component Input" (1912). The identified
component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will

I have found a solution to my problem and thought I would share it here in case there are others who are struggling with the above scenario. If you have a better way, I would love to hear about it since my way is a bit tedious.
In a nutshell, in order to have an SSIS package put data from an OLE DB Source into a SharePoint List Destination Lookup Column, you need to pass the ID of the value that is being looked up, not the value that is in the “master” OLE DB source.
Rough explanation, OLE DB Source value for column “Approp” is “4005” --> SQL matches “4005” with the ID in the new lookup table (“4005” = ID “5” as defined in the SharePoint lookup list) --> “5” gets passed into SharePoint List destination lookup
column --> SharePoint displays “4005” and successfully links to the lookup list.
Funny thing (not really), the error(s) outlined in my original post are not related in getting data into a SharePoint Lookup column as I am now successful in getting data into the system but I am still getting the same above error(s). I think it has to do
with the ID column in the SharePoint list destination. What I can’t seem to figure out is why since I am not linking any data to that ID column (at least on new records). I am however linking it on Update and Delete and the errors mentioned above disappear
and things work well.
There are three tasks that need to get done in order to get data from SQL into a SharePoint lookup column assuming you have already set up your SharePoint lookup lists:
1. Create new lookup table(s) in SQL that has the IDs from the SharePoint Lookup list and the values coming from the “master” OLD DB Source. You can see the ID column in SharePoint by toggling it on in a view.
2. Create a SQL command that JOINs all the databases and tables so that the ID is passed and not the value into the SharePoint lookup column
3. Change the “Data access mode” to “SQL Command” instead of the “Table or view” in the OLE DB Source and paste your command into the “SQL command text:” area.
Other helpful info is that you may also need to add additional columns in the new lookup tables in SQL for the scenarios when the data is not unique. You can see this two times in my SQL command example for Units and JobTitles:
SELECT
pps.SSNm,
pps.file_updated,
pps.Employee_id,
/* pps.CheckDistNm,*/
Check_Distribution_id = COALESCE( d.ID, 0 ),
pps.Job_nbr,
pps.SeqNm,
pps.action_eff_dt,
Fund_id = COALESCE( f.id, 0 ),
Appropriation_id = COALESCE( ap.id, 0 ),
ActionCode_id = COALESCE( ac.id, 0 ),
SpecNumber_id = COALESCE( jt.ID, 0 ),
pps.Employee_id,
/* pps.Fund,
pps.Approp,
pps.Unit,*/
Unit_id = COALESCE( u.ID, 0 ),
PosNm,
PosCode,
pps.LastName,
pps.FirstName,
pps.MI
FROM
x_PPS.aReportVw.pps_screens_active AS pps
LEFT OUTER JOIN dbo.DistributionNumbers AS d ON
pps.CheckDistNm = d.Check_Distribution
LEFT OUTER JOIN dbo.Units AS u ON
pps.Fund = u.Fund AND
pps.Approp = u.Approp AND
pps.Unit = u.Unit
LEFT OUTER JOIN dbo.Appropriations AS ap ON
pps.Approp = ap.Approp
LEFT OUTER JOIN dbo.Funds AS f ON
pps.Fund = f.Fund
LEFT OUTER JOIN dbo.ActionCodes AS ac ON
pps.ActionCode = ac.ActionCode
LEFT OUTER JOIN dbo.JobTitles AS jt ON
pps.SpecNm = jt.SpecNumber AND
pps.JurisClass = jt.JurisClass

Similar Messages

  • Is there an easier way to insert date into an MS SQL Server database ?

    Is there an easier way to insert date into an MS SQL Server database without using the DateFormat?

    USe a PreparedStatement and then the method setDate (or setTimestamp )
    http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html

  • Is there a way to insert comments into numbers on an ipad, or an alternative?

    Is there a way to insert comments into numbers on an ipad, or an alternative?

    If you mean in the iBooks app - tap on Collections in the upper left corner. Then tap New. Name the collection. Tap Done. Then tap the Edit button in the upper right. Tap on the books that you want to move to select them. Tap Move in the upper let corner. Select the newly created collection.

  • Is there a way to enter data into a numbers cell on the screen directly, no keypad?

    Is there a way to enter data into a numbers cell on the screen directly, no keypad?
    Using a stylus or finger?

    No. You have to use the built-in keyboard or a bluetooth connected external keyboard.
     Cheers, Tom

  • Is there a way to download data into CSV format?

    Is there a way to download data into CSV format?
    I can't do this using delimiter as ',' because user wants the decimal format in the ','s only.
    Any suggestions?

    go through this link...
    Download CSV file in presentation server through FM GUI_DOWNLOAD
    Re: how to create a CSV file
    type-pools:TRUXS.
    data: begin of itab occurs 0,
          vbeln like vbap-vbeln,
          posnr like vbap-posnr,
          end of itab.
    data:  itab1 type TRUXS_T_TEXT_DATA.
      select vbeln
             posnr
             up to 10 rows
             from vbap
             into table itab.
    CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
    EXPORTING
       I_FIELD_SEPERATOR          = ','
      TABLES
        I_TAB_SAP_DATA             = itab
    CHANGING
       I_TAB_CONVERTED_DATA       =  itab1
    EXCEPTIONS
       CONVERSION_FAILED          = 1
       OTHERS                     = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
       CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'C:TEMPtest.TXT'
        TABLES
          data_tab = itab1
        EXCEPTIONS
          OTHERS   = 1.

  • Is there a way of inserting symbols into JTextPane?

    Hi there folks. Is there a way of inserting symbols like greek letters in a standard way into JTextPane?

    use getDocument(). insertString(offs,str, attributes);
    str should contain proper unicode chars and attributes must contain proper font family to show the chars.
    use StyleConstants.setFontFamily()
    regards,
    Stas

  • How to insert data into the BLOB column

    Hi All,
    Can anyone help me to insert data into the BLOB data type column?
    The table structure is
    CREATE TABLE XXATFL_DM_FORCAST_STG
    TASK_ID NUMBER,
    USER_ID NUMBER,
    CREATED_BY NUMBER(15),
    CREATION_DATE DATE,
    LAST_UPDATED_BY NUMBER(15),
    LAST_UPDATE_DATE DATE,
    LAST_UPDATE_LOGIN NUMBER(15),
    RECORD_STATUS VARCHAR2(1 BYTE),
    ERROR_MESSAGE VARCHAR2(4000 BYTE),
    DATA_FILE BLOB
    I want to insert data in the DATA_FILE column. and this insert statement will in inside a procedure.
    Please help me as soon as possible as this is very urgent for me
    Thanks & Regards,
    Chandan

    i tried like this
    sql> insert into tbl values(1, utl_raw.cast_to_raw('D:\pictures\pic2.bmp'));
    1 record created.
    sql>select * from tbl;
    sp2-0678:Column or attribute type can not be displayed by SQL*PLUS
    sql>
    is this saving only path or bmp file on that path?
    if it is saving bmp file, in which format and how can we retrive it?
    Edited by: user8967883 on Mar 31, 2010 12:57 PM

  • How to insert data into newly added column

    Hi all,
    i am having a doubt how to insert entries into newly added column..
    i created a table with two columns and inserted the data into them then i altered the table by adding additional column.now i want to insert data into that..plz tell me how to do that..??
    thanks in advance..help me

    Small example:
    [email protected]> create table t(id int, id2 int);
    Table created.
    [email protected]> insert into t values (1,2);
    1 row created.
    [email protected]> insert into t values (2,2);
    1 row created.
    [email protected]> alter table t add id3 int;
    Table altered.
    [email protected]> select * from t;
    ID ID2 ID3
    1 2
    2 2
    [email protected]> update t
    2 set id3 = 10
    3 where id = 1;
    1 row updated.
    [email protected]> select * from t;
    ID ID2 ID3
    1 2 10
    2 2
    Best Regards
    Krystian Zieja / mob

  • Best way to insert data into a non indexed partitioned table?

    Hi,
    I've a rather basic question that I haven't been able to find an answer to so hope that someone may be able to help.
    We need to insert sales data into a partitioned table that is range partitioned on sales date. The incoming sales data can span a number of days, e.g. 31-JUL-2007 through to 04-AUG-2007 inclusive. I've come up with two approaches and would like to know which you would recommend and why?
    Approach 1: Load data into each individual partition using a statement like:
    INSERT /*+ APPEND */ INTO sales PARTITION (sales_20070731) SELECT * FROM sales_new WHERE sales_date = TO_DATE('31-AUG-2007','DD-MON-YYYY')
    Approach 2: Load data into the entire table using a statement like:
    INSERT /*+ APPEND */ INTO sales SELECT * FROM sales_new
    Thanks

    You need to compare both approaches by creating simple test case.
    But there is no advantages in approach 1until you will have index on sales_date column.
    With index these approaches are comparable and you can choose whatever best fits to your requirements.
    Best Regards,
    Alex

  • Is there a way to insert AFDs into a file upon export?

    I don't *think* this is possible, but I wanted to get confirmation.  Can Premiere insert an AFD flag to a file upon export?

    AFD = Active Format Description.  A flag contained in either a file's metadata or VANC that tells a receiver/IRD/set-top-box how to display an image.  For example, an HD file/stream may contain an AFD flag for 16:9 Letterbox, so if the file/stream is downconverted the receiver/IRD/set-top box will display the SD version letterboxed, as opposed to center cut, anamorphic, etc.
    I know there are a lot of hardware items that can insert AFDs (AJA FS1, FS2, etc) and dedicated transcoders (FlipFactory, Carbon Coder, Elemental) but it would seem like this is something an editor could do as well.  Maybe not, but I'd like to know for certain...

  • Is there a way to import data into existing contacts in Address Book?

    I want to import data from a .csv (for example) into existing address book entries. It would have to recognize and match the name, then recognize the new data and enter it.
    Is that possible?
    (Now that I think about it, maybe this can be done with Address Book's existing conflict resolution method (that compares similar entries and asks which to keep)…?)

    I have answered my own question. I exported the data from a layout in FileMaker Pro containing the required fields as tab separated text. That produced a .tab file that Contacts wanted nothing to do with. However, when I changed the .tab in the file name to .txt, Contacts accepted it as a file to import (File/Import). I then identified the field in Contacts in which the data in each field in the txt file was to be placed and in it went! The trick was changing .tab to .txt in the name of the file exported by FileMaker Pro.

  • Is There A Way To Retreive Data By Combining Two Columns!

    Hi Everybody!
    The four feilds say Date1,Date2,Date3,Date4 Date1 and Date3 are date datatypes Date2 and Date4 are Char Datatypes.
    I want to find out the date difference as follows
    Date1=29-jun-2001
    Date2=13:00:00
    Date3=29-jun-2001
    Date4=13:10:34
    is there any option to write a query to get the date difference
    yours truly
    Nagaraju

    Assuming that Date1 and Date3 don't contain a time component, then the expression :-
    to_date(to_char(Date1, 'dd-Mon-yyyy') || ' ' || Date2, 'dd-Mon-yyyy hh24:mi:ss')
    to_date(to_char(Date3, 'dd-Mon-yyyy') || ' ' || Date4, 'dd-Mon-yyyy hh24:mi:ss')
    will give the number of days' difference between Date3+Date4
    and Date1+Date2.
    Plugging in your data would give .007337963.
    And then you could convert that to hours, minutes and seconds.
    An example follows of a script to do that :-
    -- x.sql
    -- =====
    -- convert decimal number into
    -- days, hours, minutes, seconds
    set feedback off verify off serveroutput on size 1000000;
    declare
    input_number number :=0.;
    num_days pls_integer :=0;
    num_hours pls_integer :=0;
    num_mins pls_integer :=0;
    num_secs number :=0.;
    leftover number :=0.;
    begin
    input_number := &1;
    num_days := trunc(input_number);
    leftover := input_number - num_days;
    num_hours := trunc(leftover * 24);
    leftover := (leftover * 24) - num_hours;
    num_mins := trunc(leftover * 60);
    leftover := (leftover * 60) - num_mins;
    num_secs := round((leftover * 60), 2);
    dbms_output.put_line(to_char(num_days) || ' days, ' ||
    to_char(num_hours) || ' hours, ' ||
    to_char(num_mins) || ' mins, ' ||
    to_char(num_secs) || ' secs');
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    end;
    hope this helps

  • How to update\insert data into a NVARCHAR column using ODBC API

    I am trying to update a Sybase table via Microsofts ODBC API. The following is the basics of the C++ I am trying to execute. In table, TableNameXXX, ColumnNameXXX has a type of  NVARCHAR( 200 ).
    SQLWCHAR updateStatement[ 1024 ] = L"UPDATE TableNameXXX SET ColumnNameXXX = N 'Executive Chair эюя' WHERE PKEYXXX = 'VALUE'";
    if( ret = SQLExecDirect( hstmt, ( SQLWCHAR* ) updateStatement, SQL_NTS ) != SQL_SUCCESS )
    // Handle Error
    The Sybase database has a CatalogCollation of 1252LATIN1, CharSet of windows-1252,  Collation of 1252LATIN1, NcharCharSet of UTF-8 and an NcharCollation of UCA.
    Once this works for the Sybase ODBC connection I need to get it to work in various other ODBC drivers for other databases.
    The error i get is "[Sybase][ODBC Driver][SQL Anywhere]Syntax error near 'Executive Chair ' on line 1"
    If i take out the Unicode characters and remove the N it will update. 
    Does anyone know how to get this to work? What am I missing?
    I wrote a C# .net project using an ODBCConnection to a SQL Server database and am getting "sort of" the same error. I means sort of as this error contains the Unicode Text in the message whereas the Sybase ODBC error has "lost" the unicode.
    static void Main(string[] args)
    using (OdbcConnection odbc = new OdbcConnection("Dsn=UnicodeTest;UID=sa;PWD=password")) // ;stmt=SET NAMES 'utf8';CharSet=utf16"
    //using (OdbcConnection odbc = new OdbcConnection("Dsn=Conversion;CharSet=utf8")) // ;stmt=SET NAMES 'utf8';CharSet=utf8
    try
    odbc.Open();
    string queryString = "UPDATE TableNameXXX SET ColumnNameXXX = N 'Executive Chair эюя' WHERE PKEYXXX = 'AS000008'";
    System.Console.Out.WriteLine(queryString);
    OdbcCommand command = new OdbcCommand(queryString);
    command.Connection = odbc;
    int result = command.ExecuteNonQuery();
    if( result == 1)
    System.Diagnostics.Debug.WriteLine("Success");
    catch(Exception ex)
    System.Diagnostics.Debug.WriteLine(ex.StackTrace);
    System.Diagnostics.Debug.WriteLine(ex.Message);
    "ERROR [42000] [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near 'Executive Chair эюя'."

    Your error comes from Sybase, so I suggest you post your question to a Sybase forum.  And be aware that Sybase does not use the same tsql dialect as sql server, so you must use their dialect (if, indeed, there is any difference in this particular situation). 
    One note - there should be no space between "N" and the Unicode string literal to which it applies in tsql.  E.g.,
    = N'Executive Chair эюя'
    not
    = N 'Executive Chair эюя'

  • How to insert data into a CLOB column

    In UIX XML I used a bc4j:textInput control for a CLOB column and I cannot type any letter in this field....Why ?
    Regards,
    Lucian

    Hello again !
    Here are my findings (Content is a CLOB column; I use UIX XML + BC4J):
    1.If I put:
    <inlineMessage prompt="Content" required="no" vAlign="middle" >
    <contents>
    <bc4j:textInput name="Content" attrName="Content" columns="162" rows="5" />
    </contents>
    </inlineMessage>
    I cannot type any letter in the text Input field !!!!!!
    2. If I put
    <inlineMessage prompt="Content" required="no" vAlign="middle" >
    <contents>
    <bc4j:attrScope name="Content">
    <contents>
    <textInput name="Content" columns="162" rows="5">
    <boundAttribute name="text">
    <bc4j:attrProperty name="value"/>
    </boundAttribute>
    </textInput>
    </contents>
    </bc4j:attrScope>
    </contents>
    </inlineMessage>
    I can type in the textInput field, but I cannot save the text after a certain number of characters. Also I cannot see the saved text. I receive :
    Servlet error: Renderer failed: java.lang.ArrayIndexOutOfBoundsException: -35</PRE></BODY></HTML>
    inside the textInput field.
    Please help me ...
    Regards,
    Lucian

  • Inserting data into a partition.

    Hi,
    I am inserting 10 million rows into a partition and its consuming lot of time (>24 hrs).
    I am using simple insert statement.
    Is there any better way to insert data into a partition.
    Thanks for your help in advance
    Thanks
    Manju

    Hello, this has nothing to do with the fact that the target table is partitioned.
    One thing you could try first-off, is a Direct Path Insert, i.e.,
    INSERT /*+ APPEND */ INTO part1
    SELECT...That will speed it up, but remember to do a COMMIT directly after INSERTing.
    Are you sure that the SELECT isn't taking a long time in itself?
    What is the value of your cursor_sharing database parameter?

Maybe you are looking for

  • MS ACCESS WORK BENCH

    Who do you Uninstall MS Access workbench ? I can't find the MS Access workbench selection in the universal installer. It looks like i have created a problem. because i installed this utility on the server machine and now. I can not login into the dat

  • Adobe won't validate serial numbers that I was given for Photoshop CS6 Extended on Mac.

    Adobe won't validate serial numbers that I was given for Photoshop CS6 Extended on Mac.  What should I do?  Calling won't work as I am deaf and I could not find any solution on internet to this.  I tried offline option and also reinstalling program b

  • "Incompatible Angle VOBUs" Mixed-Angle issues

    Does anyone know what "Incompatible Angle VOBUs" error means? I am working on a mixed angle DVD and I am having a horrible time. I get the "Internal Muxer error", or "Incompatible Angle VOBUs" errors and the build/burn fails. I've tried several diffe

  • Please help...syncing?  Streaming?

    Hi Gang, My ATV is acting kinda weird after the 2.0 update. Everything was fine with the original firmware. Here is my situation: I only have an Airport Snow. Because it takes so long to sync movies, etc., I was hooking the ATV to my laptop via Ether

  • D600 Camera Raw Error

    I downloaded a trial version of CS6 yesterday and finally had the chance to edit all the Camera Raw from my Nikon D600 RAW files. It was great! Today I downloaded all the updates yesterday as prompted by Adobe..Now NONE of my RAW files will open and