TEXT Columns Using OLE DB Source Task

Apr 19, 2007

Hi there,

I was trying to execute an OLE DB Source task with a SQL Command and I got the following error:Only text pointers are allowed in work tables, never text, ntext, or image columns. The query processor produced a query plan that required a text, ntext, or image column in a work table.
I read this forum and I checked the data types in boths sides (source and target) and they are the same data types, TEXT. http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=46086

I already execute my query from SSMS using linked server to connect to the source and it worked. I could load the data into my target table. Then, I tried to execute it on SSBIMS and it failed. I wanted to try an Execute SQL Task but the problem is that I can only have one connection object assigned to the task. So I cannot pull the data from one db and insert them into another with one Execute SQL Task.

Any ideas of why am I getting this error? Do I need to set a property to something in order to run my query using OLE DB Source Task?

I'd appreciate any help/comments/suggestions.

Thanks!

View 1 Replies


ADVERTISEMENT

XML TASK XSL Variable: Exception 'Property New Source Has No Source Xml Text'

Dec 20, 2005

Hi,
I want to transform an xml flow to an html flow. For this, I create an XmlDataDocument, I add on it, all that I want, and I store it in a file (in a dataflow task).
After that, in an xml task, I set the input properties like that:
Operation type: xslt
SourceType: File connection
Source: ras.xml
 
All works fine. But now, I want to use a variable to store my xml data. So, instead of storing my data in ras.xml, I store it in a variable like that:
 
Dim v As Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables90
Me.VariableDispenser.LockOneForWrite("RAS", v)
v("RAS").Value = doc.OuterXml
v.Unlock()
 
and in the xml task, I set configuration like that:
 
Operation type: xslt
SourceType: Variable
Source: user::RAS
 
But when I execute, I got this following exception:
 
Error: 0xC002F304 at Format HTML Mail, XML Task: An error occurred with the following error message: "Root element is missing.".
Error: 0xC002928F at Format HTML Mail, XML Task: Property "New Source" has no source Xml text; Xml Text is either invalid, null or empty string.
 
Furthermore, when I want to debug it, in replacing the xml task, by a script task, I can see that in my RAS variable, I get the xml data which is well formed.
 
<?xml version="1.0" encoding="UTF-8"?>
<root> €¦
</root>
 
(When I store it in a file, I can see it in IE)
 
Have you got an idea ?
 
 
 
 

View 3 Replies View Related

SSIS Wizard Cannot Import Text Columns Longer Then 255 Using Excel Source

Nov 29, 2006

(Applies to SQLServer 2005 SP1)

We have found that using the SSIS "Import and Export Wizard" using the "Microsoft Excel" data source that there appears to be a maximum column length of 255 characters for any row.

Even when defining the destination table columns as nvarchar(4000), the wizard fails with the errors shown below.

We have found no workaround except manually changing the imput data. There doesn't appear to be any "Advanced" options for the Excel importer as there are for the flat-text importer. So, no question here, just posting the bug so that *next* time someone searches the web for an answer, this post comes up

MessagesError 0xc020901c: Data Flow Task: There was an error with output column "English String" (18) on output "Excel Source Output" (9). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard) Error 0xc020902a: Data Flow Task: The "output column "English String" (18)" failed because truncation occurred, and the truncation row disposition on "output column "English String" (18)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component. (SQL Server Import and Export Wizard) Error 0xc0047038: Data Flow Task: The PrimeOutput method on component "Source - Sheet1$" (1) returned error code 0xC020902A. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. (SQL Server Import and Export Wizard) Error 0xc0047021: Data Flow Task: Thread "SourceThread0" has exited with error code 0xC0047038. (SQL Server Import and Export Wizard) Error 0xc0047039: Data Flow Task: Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown. (SQL Server Import and Export Wizard) Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error code 0xC0047039. (SQL Server Import and Export Wizard)


edit: After searching further this is documented under "Excel Source"
in BOL which provides a registry-based workaround.  I guess the issue
is that the wizard considers truncation to be  a 'fail' case and
there's no easy way to override this behaviour, specify the column
types nor determine which line is in error)



Truncated text. When the driver determines that an Excel column contains
text data, the driver selects the data type (string or memo) based on the
longest value that it samples. If the driver does not discover any values longer
than 255 characters in the rows that it samples, it treats the column as a
255-character string column instead of a memo column. Therefore, values longer
than 255 characters may be truncated. To import data from a memo column without
truncation, you must make sure that the memo column in at least one of the
sampled rows contains a value longer than 255 characters, or you must increase
the number of rows sampled by the driver to include such a row. You can increase
the number of rows sampled by increasing the value of TypeGuessRows under
the HKEY_LOCAL_MACHINESOFTWAREMicrosoftJet4.0EnginesExcel registry
key.
)

View 21 Replies View Related

Urgent. Output Columns Are Not Appearing When I Use OLEDB Data Source With An Oracle Stored Procedure In Dataflow Task

Nov 12, 2007

I am using execute sql task to run a stored procedure in oracle database which returns a resultset. This works. Now I need to send the ouput to a destination table in a sql database. Should I use for each loop to pick the resultset and insert it into the destination one by one (which I dont think is a great idea) or is there a better way to accomplish this task (in data flow task) ?

When I use dataflow task instead of execute sql task, the main issue is I am not able to see the output columns when I execute an oracle stored procedure, but when I see the preview I can see the resultset . But I can see the output columns for a sql server stored procedure.

View 9 Replies View Related

Can A Result Set From SQL Script Task Be Used As A Source For Data Flow Task?

Oct 2, 2007

I have a stored procedure that is executed via a sql script task that returns a full result set. I map this result set to a variable or object type. Is there a way to use this variable as a data source in a subsequent data flow task?

A.

View 14 Replies View Related

OLE DB Source To Flat File Destintation Using Fixed Width Columns - Determining Source Column Width

Feb 13, 2007

Hi,

I am trying to create a program that transfers tables to flat files.
At this point in time, I have suceeded in created one that creates delimited files.

However, I am now trying to create fixed-width files as you can do with the SSIS designer, but programatically.

Is there a way to programatically determine the width of a column from the source table? I can not seem to find any kind of function or member that stores this information or allows me to retrieve it.

I know what I need to change in order to set a width for a column, but I just don't know how to find the width without just asking the user to provide one.

View 5 Replies View Related

Full Text And Text Columns

Oct 21, 2007

Can you not add a text column to a full text index?? If I change it to a nvarchar it works fine but if I change it to a text column it wont index. Anyone know how to fix this?

View 1 Replies View Related

WEb Service Task Consumed By XML Source

Mar 21, 2007

Hello,

I am trying to sync a database with data from a web service.

In my control flow I have the Web Service Task setup correctly (I can run the project and the expected data is output to a file if I set the output of the web service task to type "File Connection").

What I would like to do is set the OutputType of my Web Service Task to "Variable" and have the Xml Source component in my Data Flow read the variable and process it.

I have already created a variable of type string to link the two parts together, but I have not figured out how.

Any suggestions? I have been searching the web, but have not found an answer to my question.

Greg.

View 3 Replies View Related

Target And Source Columns DataType

Nov 27, 2011

I need to create an Bulk upload utility using ASP.Net and SQL Server. Below is the process for the uploads -

Excel Template wherein user will enter the details. A Tab-delimited output file will be generated using the VBA.
There are 2 tables - one is Temp Table which is replica of the the final table and second is the final table
Using File.OpenText(filePath).ReadLine() - All the Rows from the tab delimited data file will be inserted into DataTable.

using SQLBulkCopy the tab-delimited data file data will be inserted into the Temp Table.

Data will be validated based on the data inserted in the temp table. If the data as errors then the temp table will be cleared else the data will be inserted from the temp table to the final table.

My Issue is that in both the tables there is a column (Name : PeopleKey (Int PrimaryKey)). If the user enters Alphabetic value then the Bulk Utility is failing. Below are the two options in my mind -

1. I can change the DataType in Temp table from int to VARCHAR. So, the data can be inserted at first and then I can validate and get the data corrected. But i am not sure whether it is the right way to fix issue as the source and target tables columns are different.

2. When the data in inserted into the Datatable by following Step 3. So, once the data in inserted into DataTable then i can validate there. Thus the source and target tables Datatype will be same.

View 1 Replies View Related

Copy Columns From Source To Destination

Apr 10, 2007

Hi all,

I want to copy 2 columns from 1 database to another database.
I managed to do this, using a Ole DB source and a Ole DB destination dataset.

Now I want to merge 2 colums into 1:
Source Database: Column A: first name, Column B: Lastname.
Destination Database: Column 1: First and lastname customer.

Thanks for your help!

Kind regards,

Marcel Hijnen
eXDe Solutions B.V.

View 4 Replies View Related

Excel Source With Optional Columns

Jan 31, 2007

Hi:

I use a SSIS package to loop thro a folder and load data from multiple excel files to a SQL2005 table. Works fine except when an excel has a missing col.

Col names in xls are always a subset of col names in the table. The missing cols are random, else I would just have made another package:-)

Once a missing column is found, I get runtime and design time errors, and metadata problems. How can a get SSIS to ignore missing columns?

TIA





View 3 Replies View Related

OLE DB Source Editor And External Columns

Apr 23, 2008

I have query like below that I am using as a OLE DB source

Set NOCOUNT ON

Select *
Into #temp1
from A

Select *
Into #temp2
From B

Select * from #temp1 a
Join #temp2 b on a.episode_key = b.episode_key


I can see the preview data , but when I click columns, there are no available external columns..
Howcan I fix this issue?

View 8 Replies View Related

Mapping Source And Destination Columns

Feb 21, 2007

can somebody show an example of how to map source and destination columns when uploading a file to sql server?

Also, please send me the mapping when i want to map source to different destination columns.

View 1 Replies View Related

DB2 Connect And SSIS | Error In OLE DB Source Task

Jul 10, 2007

Hi All,



I am trying to connect to DB2 database via OLE DB connection manager in SSIS. But when I enter the SQL Query and press OK it gives following error

"Error at Data Flow Task - Header Load [OlE DB Source - Header_Load[1]]": An OLE DB Error has occured. Error Code: 0x80040E21

Additional Information:

Exception from HRESULT: 0xC0202009(Microsoft.SqlServer.DTSPipelineWrap)"



I followed following steps: -

1. I created OLE DB provider and tested the connection, it was successful(with give username and password)

2. Created query in Build query as following and tried executing it. It worked! Query used was

SELECT SRC_ID, ORG_ID FROM DB123.DEAL_HEADER

3. But when, in OLE DB Source Provider Task, when I press preview, It thorws the above error!



Kindly let me know, Because I am stuck at that point.



Thanks

Sid

View 9 Replies View Related

Truncation Error From XML Source In A Dataflow Task

Oct 10, 2006

I am trying to use an XML Source on xml data from an XML webservice, I am putting the document into a variable the trying to import the data from there with the XML Source, but I am getting an error telling me that truncation occured

The Error is "[XML Source [1]] Error: The "component "XML Source" (1)" failed because truncation occurred, and the truncation row disposition on "output column "linking" (1579)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component."

The linking column mensioned in the error is sometime quite a long string but there is nowhere in the XML Source editor to change the size.

HELP!

View 3 Replies View Related

Advice Required With Script Source Task

May 30, 2007

Hi there,



We are trying to use SSIS to import data from a flat file. The file contains a mixture of 2 different sets of data - first there are an unknown number of rows that define the column names, and then there are rows of the data itself that are delimeted and that contain the same number of columns as are defined above.



Anyway, the only way we can see to import this data is first via a Script Source task, since for a flat file source we'd need to specify the number of rows to skip, which is unknown at design time. If anyone knows any way of getting round this I'd appreciate your advice.



So in the scrip source task we are looping through the rows in the flat file and writing to 2 output buffers - one for the metadata and one for the data itself.



The problem is the Script Source task only lets you specify output columns at design time, and we don't know what columns to output until run time as the number of delimited columns is unknown.



So does anyone know of a way of either:

Adding output columns for a script source task at run-time OR
Alternatively, we could output the delimited data from the Script Sourceas one long column. If so, what would be the best way of then splitting this up into individual columns?



Many thanks,



Richard F

View 4 Replies View Related

Excel Source Trying To Import Additional Columns

Apr 17, 2008

Hi

I have an excel source which is a 41 column sheet. The excel filepath is stored in a table and captured into a variable. The excel source import is contained within a foreach loop and will loop through each file and continue until all the excel files are processed. It works fine until it gets to the last file. The import then fails with the following error:

The column "F42" needs to be added to the external metadata column collection.
The column "F43" needs to be added to the external metadata column collection.
The column "F44" needs to be added to the external metadata column collection.
The column "F45" needs to be added to the external metadata column collection.
The column "F46" needs to be added to the external metadata column collection.
The column "F47" needs to be added to the external metadata column collection.

Now when i open the excel sheet and hit CTRL+END the cursor goes to a column 6 to the right of the last column with data in it, effectively column 47 where column 41 is the end of my data.

I guess that the jet engine is trying to import these additional columns but because i am not expecting them there is no destination set up for them in the OLEDB destination and susequently the metadata needs to be added. I do not want to do this as these are excel files originating from the client and i cannot control how many additional columns they are going to "add".

Does anyone have any ideas as to how i can solve this? Is there a way of identifying the last column with data and only importing those columns?

Thanks in advance for any help or experience of this issue

View 2 Replies View Related

XML Source Error Output Columns Set To NTEXT?

Aug 17, 2007

I've read about the XML Source sometimes setting error output columns to DT_WSTR(255), but mine is now setting them to DT_NTEXT.

Anyone have any suggestions short of an XML editor? I'm concerned that I might do something to "refresh" the columns and cause the problem again.

View 2 Replies View Related

Question About Excel Source - How To Modify Columns??

Aug 22, 2007



Hi,

I have a package that uses an Excel file source. There appears to be no place to modify the column data types as you can with a flat file manager. As such, the source columns do not match the columns in the database.

I believe I must be overlooking something here.

Can someone please tell me how I can modify the Excel column datatypes?

Thanks

View 7 Replies View Related

How To Update The Source Columns'metadata Automatically?

Dec 14, 2006

Take a Dataflow Task, with an OLEDB Source Component and an OLEDB Destination Component in it. The Source component's Source is stored in a SQLQuery variable, and the Destination component's Destination is stored in a TableName variable. The Dataflow Task is put into an For Loop container.

I just want to do one thing:

In the For Loop, everytime it send a new value to the SQLQuery variable and the TableName variable, then I could use it to transfer many tables in a same logic.

My question is: Really, I could send new values to the variables and make it go. But everytime it says "The external metadata column collection is out of synchronization with the data source columns." Because the external metadata was recorded and not be change automatically everytime of Loop.

How to update the source columns'metadata automatically?

View 3 Replies View Related

SSIS OLE DB Source No Columns Displayed Problem

Oct 3, 2007

Hi SSIS Experts

I have a problem in that I execute the following code within a OLE DB Source to a SQL 2k database. The results are returned when I press the Preview button however when I open the Columns tab I do not get results returned.

As you will see from my code I have tried to use both a table var & # table both produce the same results.

Any Solutions to this more then welcome



set nocount on

declare @l_Table_name varchar(255)
,@l_cmd varchar(4000)
,@l_db_name varchar(255)

Declare @result table (
SQLInstanceName varchar(255)
,DatabaseName varchar(255)
,TableName varchar(255)
,RecordDate datetime
)

-- Create temp table to hold Table data
create table #TableList
(
SQLInstanceName varchar(255)
,DatabaseName varchar(255)
,TableName varchar(255)
)

-- Load list of databases from master into Cursor
declare db_name_cursor insensitive cursor
for
select name from master..sysdatabases where name <> 'Tempdb' -- Exclude Tempdb

open db_name_cursor

fetch next from db_name_cursor into
@l_db_name

While (@@fetch_status = 0)
begin



-- Build select statment to be executed on each database.
set @l_cmd = 'use ' + @l_db_name
set @l_cmd = @l_cmd + ' insert into #TableList (SQLInstanceName,DatabaseName,TableName) '
set @l_cmd = @l_cmd + ' select @@servername SQLInstanceName,db_name(), name from sysobjects WHERE type = ''U'''

-- Exec the command
exec (@l_cmd)

--print @l_cmd


fetch next from db_name_cursor into
@l_db_name
end

-- Clean up Cursor
close db_name_cursor
deallocate db_name_cursor



insert into @Result
select *,getdate() RecordDate from #TableList

drop table #TableList
set nocount off

Select * from @result

View 13 Replies View Related

No Columns When Using Temp Tables In T-SQL In OLEDB Source

Mar 14, 2006

We have a complicated select query that needs to build a couple temporary work tables that are then used in the final select statement (in an OLEDB Source data flow control). We can click preview and see the resultset, but if we click on the Columns view there are no columns. We can save and close the OLEDB Source control but downstream from it there are messages saying that there are no input columns. The T-SQL looks something like this (abbreviated):

SELECT fieldlist INTO #temp1 FROM table

SELECT fieldlist INTO #temp2 FROM table

SELECT fieldlist FROM table INNER JOIN #temp1 INNER JOIN #temp2

DROP TABLE #temp1; DROP TABLE #temp2

Has anyone been able to use temp tables in a source SQL statement in a data flow? Are we doing something wrong or incomplete?

Thanks, Gordy

View 3 Replies View Related

Data Source Views - Calculated Columns

Feb 7, 2007

Q: How do I use Calculated Columns from a Data Source View in an OLEDB Data Source Adapter.

I took the following steps:

- Created new SSIS project
- Added a Data Source connecting to a SQLServer2005 DB (MyDataSource)
- Added a Data Source View based on MyDataSource (MyDSV)
- Created a Calcualted field to Table Object MyTable (MyCalcField)
- Added a Connection Manager based on MyDSV
- Added Data Flow to Project
- Added OLEDB Source Adapter to Data Flow
- Attempting to Access Calculated Field MyCalcField to be used in Data Flow.

ISSUE: I can't seem to find a way to get the Calculated field to pass through. It's as though this metadata is not available to the Flow.

Anyone have any ideas?

Thanks - MikeyNero

View 6 Replies View Related

Source And Destination Connection Info Of A Dataflow Task.

Mar 29, 2007

Hello All,





I am trying to convert an application created using DTS classes to SSIS object model. I have found following code in the application.



For x As Integer = 1 To mTask.Properties.Count




If mTask.Properties.Item(x).Name = "SourceConnectionID" Then




CnID = mTask.Properties.Item(x).Value

Exit For

End If

Next



For x As Integer = 1 To mPkg.DTSPackage.Connections.Count


If mPkg.DTSPackage.Connections.Item(x).ID = CnID Then


Return mPkg.DTSPackage.Connections.Item(x).Name
End If

Next



Return mTask.Properties.Item("SourceObjectName").Value



How can I retrieve or Set "SourceConnectinId", "SourceObjectName" of a data flow task in SSIS



Please help me to solve this problem.



Thanks in advance



Subin

View 5 Replies View Related

Data Flow Task - OLEDB Source / Destination

Nov 9, 2006

Hi

Inside a data flow task, i have a oledb source and destination. In my situation, I need to pull data from a table in the source, but also hard code some columns myself, which means my source is a blend of data from table, hard coded data, which will then have to be mapped to columns in oledb destination. Does anyone which option to choose in the oledb source dropdown for the data access mode. Keep in mind, i do need to run a a select query, as well as get data from a table. Is it possible to use multiple oledb sources and connect to one destination, because that is really what intend to do here. I am not sure how it will work, or even if its possible. Basically my source access mode needs to be a blend of sql command and table columns, how would that be implemented? Any help or advice is appreciated.





MA

View 4 Replies View Related

Validation Error. Data Flow Task: OLE DB Source [94]:

Nov 8, 2007

Dear all,

I am trying to executed a packege so that it loads data from from the excel file to the SQL Server Server database.
When I execute it, it prompts the following error message and 1 warning
The excel file has three colums, Week, Item and Value




Error 4 Validation error. Data Flow Task: OLE DB Source [94]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80040E37 Description: "ORA-00942: table or view does not exist ". Test - GET NW PERF 1.dtsx 0 0

Warning




Warning 1 Validation warning. Data Flow Task: OLE DB Destination [36]: The external metadata column collection is out of synchronization with the data source columns. The column "DAY" needs to be added to the external metadata column collection. The column "TCH_AVAIL" needs to be added to the external metadata column collection. The column "PDROP" needs to be added to the external metadata column collection. The column "P_HR" needs to be added to the external metadata column collection. The column "SFAIL" needs to be added to the external metadata column collection. The "external metadata column "VALUE" (90)" needs to be removed from the external metadata column collection. The "external metadata column "ITEM" (89)" needs to be removed from the external metadata column collection. Not in use - GET NW STATS.dtsx 0 0

Could someone give me a hand here.

Regards,

Ronald

View 1 Replies View Related

Send Mail Task Source(body) Question

Jan 31, 2008

Hi there,

I want to set the body of the mail which i need to send to a variable. What is the best variable to use for that since the message can be quite large and Im not sure whether string is the best option since I see there is an Object variable type but I have not Object variable types before.

Any opinions on this?

Cheers
Mike

View 3 Replies View Related

Can We Use Excel File (source) For Bulk Insert Task

Jun 1, 2007

Can an excel file be used as a source for a Bulk Insert Task in SSIS instead of a delimited flat file?

View 6 Replies View Related

How To Use Criteria With Text File Source In DTS Package?

Sep 4, 2006

I have a peculiar problem with a database.

I need to import data from text files where one column matches a value in a table that's already on the database. I cannot even fathom how to do this without pulling the entire 1GB file onto the database and simply deleting data that doesn't match the criteria. While this would work, I'm sure there's a more efficient way to do it! Can anyone give me some pointers? I'm not exactly a DTS expert.

Thank you.

View 4 Replies View Related

Dynamic OLE DB Table Source From Variable Not Seeing Input Columns

Dec 12, 2007

I am building an SSIS package that loops through a table in SQL Server and dynamically builds a select statement that i would like to use as an ole db source. I have been having a difficult time with this as the select statement that i am generating is over 200,000 characters long so using an sql variable is out of the question.

I ended up placing the select statement into a table where each row of the table represents a piece of the select. I then use an execute_sql task that selects the entire rowset from this table into a variable object. I then use a for each loop to shred the variable and concatenate it into on big string variable called user:: sql_statement that is my select.

After setting up the loop and testing to see if the user:: sql_statement variable populates correctly i then added a data flow transfer with an ole db source and destination. I then go into the advanced editor for the source and set it to accept an sql statement from a variable and use my user:: sql_statement variable. I was forced to set validate external metadata option to false to avoid an error since there is no way to validate the columns until the for each loop runs during run time.

Now thats all fine and good but what is causing my problem is that during run time, when the package gets to the data flow task, the select statement doesn't seem to be populating the input columns of the data source. I have been searching to no avail on a way to tell the data source to update the input columns but every time it gets there, the package bombs out telling me the ole db source has no available output columns.

Specifically the error i get is :
[DTS.Pipeline] Error: "output "OLE DB Source Output" (6616)" contains no output columns. An asynchronous output must contain output columns.

Any help with this would be much appreciated.

View 18 Replies View Related

OLEDB Source - Use Table Or Select Only Columns Needed.

May 30, 2006

Hi All,

With the OLEDB source, is it wrong to use a table / view as a source and only check the columns required or is it beneficial to write a select col1, col2 etc etc as a SQL command?

I cannot see any difference in performance between the two.

Thanks.

View 6 Replies View Related

DB Design :: Copy Specific Columns For Source To Destination

Nov 4, 2015

I am trying to Import data into SQL server 2008 using management studio.  The source data is an Access dbase.  I am trying to do this with queries as the tables do not match but I do need to copy specific columns for the source to the destination. Any brief example selecting a column from the source table, and just entering a dummy value for other columns(other column of data for destination table does not exist in source table). 

For the example

Source access dbase, just two columns but no primary key, T2dbase, Employee

New table.

First Name, Description
 Tom          , manager

Destination dbase SQLServer (T1dbase,Employee table), note 4 columns
Primary key NameID, FirstName nvarchar (20), LastName nvarchar (20), Description nvarchar(20)

View 5 Replies View Related

XML Source - No External Columns Avail-- Syntax Error In XML/XSD?

Jan 28, 2008

Hi All,

Hopefully someone can help me with what I'm sure is a very simple question (new to the XML thing). I receive an XML file from "someplace" that I need to parse out using the XML Source in SSIS. I have SSIS generate me an XSD document, as one isn't provided for me. However, after I do this, SSIS does not show any available external columns to pull data from- the "Columns" section of the source is just blank. I'm pretty sure this has to do with a syntax error in either the XML file that is being provided to me, or the XSD doc that SSIS is generating. Below are both (obviously with data dummied up). Can someone take a look and let me what needs to be changed in either file to get this up and running? I'm looking to grab the AccountNumber, RecordNumber, ProcessedDate, Status, and StatusMessage elements.


XML File:



Code Snippet
<?xml version="1.0" encoding="utf-16"?>
<AccountResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<AccountNumber>S12345678</AccountNumber>
<RecordNumber>AAA1122</RecordNumber>
<ProcessedDate>Monday, January 28, 2008 11:07 AM</ProcessedDate>
<Status>0</Status>
<StatusMessage>Complete</StatusMessage>
</AccountResponse>



XSD File:



Code Snippet
<?xml version="1.0"?>
<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:element name="AccountResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="AccountNumber" type="xs:string" />
<xs:element minOccurs="0" name="RecordNumber" type="xs:string" />
<xs:element minOccurs="0" name="ProcessedDate" type="xs:string" />
<xs:element minOccurs="0" name="Status" type="xs:unsignedByte" />
<xs:element minOccurs="0" name="StatusMessage" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xsd:schema>
Thanks!

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved