Showing posts with label tables. Show all posts
Showing posts with label tables. Show all posts

Friday, March 30, 2012

populate access database from a TableCollection

Hi,

I need to ask about how can I populate an access database tables directly with the tables in a TableCollection that already exist in my application.

Thanks for any help,

Aya.

You can either use DTS or Linked server in this case to capture the information.|||

Thanks too much for the reply , but can I get some explanation about how to use the DTS.

Thanks in advance,

Aya.

|||

Hi,

if you choose DTS, you'll need to make a DTS package, here is a related article:

http://www.devarticles.com/c/a/ASP/Creating-DTS-Packages-With-SQL-Server-2000/

|||

The TableCollection in my case is the collection of tables contained in the DataSet.

Can I use the DTS to copy it directly to access database?

Thanks,

Aya.

sql

Populate a Table with Stored Proc.

I am looking to populate a Schedule table with information from two
other tables. I am able to populate it row by row, but I have created
tables that should provide all necessary information for me to be
able
to automatically populate a "generic" schedule for a few weeks or
more
at a time.

The schedule table contains:
(pk) schedule_id, start_datetime, end_datetime, shift_employee,
shift_position

A DaysOff table contains:
(pk) emp_id, dayoff_1, dayoff_2 <-- the days off are entered in day
of
week (1-7) form

A CalendarDays table contains:
(pk) date, calendar_dow <-- dow contains the day of week number (as
above) for each day until 2010.

My main question is how to put all of this information together and
have SQL populate the rows with data based on days off. Any
suggestions?Nate (nate.borland@.westecnow.com) writes:

Quote:

Originally Posted by

I am looking to populate a Schedule table with information from two
other tables. I am able to populate it row by row, but I have created
tables that should provide all necessary information for me to be able
to automatically populate a "generic" schedule for a few weeks or more
at a time.
>
The schedule table contains:
(pk) schedule_id, start_datetime, end_datetime, shift_employee,
shift_position
>
>
A DaysOff table contains:
(pk) emp_id, dayoff_1, dayoff_2 <-- the days off are entered in day
of
week (1-7) form
>
>
A CalendarDays table contains:
(pk) date, calendar_dow <-- dow contains the day of week number (as
above) for each day until 2010.
>
>
My main question is how to put all of this information together and
have SQL populate the rows with data based on days off. Any
suggestions?


Just as a reminder, in case you are getting old and don't remember
what you did yesterday, you posted this question yesterday as well,
and I replied by asking some questions, and Plamen Ratchev suggested
some queries. I suggest that you go Google news and find the old
thread and review our replies.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Erland Sommarskog wrote:

Quote:

Originally Posted by

Nate (nate.borland@.westecnow.com) writes:

Quote:

Originally Posted by

>I am looking to populate a Schedule table with information from two
>other tables. I am able to populate it row by row, but I have created
>tables that should provide all necessary information for me to be able
>to automatically populate a "generic" schedule for a few weeks or more
>at a time.
>>
>The schedule table contains:
>(pk) schedule_id, start_datetime, end_datetime, shift_employee,
>shift_position
>>
>>
>A DaysOff table contains:
>(pk) emp_id, dayoff_1, dayoff_2 <-- the days off are entered in day
>of
>week (1-7) form
>>
>>
>A CalendarDays table contains:
>(pk) date, calendar_dow <-- dow contains the day of week number (as
>above) for each day until 2010.
>>
>>
>My main question is how to put all of this information together and
>have SQL populate the rows with data based on days off. Any
>suggestions?


>
Just as a reminder, in case you are getting old and don't remember
what you did yesterday, you posted this question yesterday as well,
and I replied by asking some questions, and Plamen Ratchev suggested
some queries. I suggest that you go Google news and find the old
thread and review our replies.
>
>


Hmm. I'm getting old and I don't do daft things like that!
Now, what was I doing before I read this?...

Poor plan choice

Hello,
A couple days ago one of our queries suddenly started to perform
abyssmally. The query is pretty straightforward - it joins several
tables all on foreign keys and includes a GROUP BY with COUNT(*). I
looked over the query plan and it looked a little odd so I tried
cutting the query down to see where the issue might be. I eventually
came up with the following:
SELECT COUNT(*)
FROM Table1 T1
INNER JOIN Table2 T2 ON T2.table2_id = T1.table2_id
WHERE T1.my_date = '2004-11-18'
The table and column names have been changed to protect the innocent,
but that is the exact format of the tables. Table1 has about 35M
records. Table2 has about 6.5M records. For the date in question,
Table1 has about 165K records.
There is a non-clustered index on T1.my_date and there is a clustered
index on T2.table2_id.
The query plan for this simple query does an index seek on T1.my_date
as I expected then it does a bookmark lookup (presumably because it
needs T1.table2_id). It then includes parallelism, a hash, and then a
bitmap creation. Meanwhile, it does an index scan using an index on
Table2 that includes a single column that isn't even mentioned in the
query(?!?!). It then uses parallelism and does a hash match/inner
join.
I've done UPDATE STATISTICS using WITH FULLSCAN for both tables and
I've done a DBCC CHECKTABLE on both tables. Neither had any effect. I
also tried to force the query to use the clustered index for Table2.
For the simple query above it doesn't seem to help performance as the
clustered index scan has a very large cost to it (I'm not sure that I
entirely understand why). In the original query it helps substantially
though. Instead of joining the 6.5M records to a lookup table first it
joins it to Table1 first, which cuts down the number of records to the
165K before going about with other joins.
What I'm looking for is any advice on other things that I can look at
or any ideas on why SQL Server might be making these kinds of choices.
I would have thought that the simple query above would have performed
much better than it is currently (~30-35 seconds). I realize that
there has to be a bookmark lookup, but I was still expecting a quick
response from the server based on the indexes.
Because of the table sizes, etc. I don't expect anyone to reproduce my
results, so please don't ask me to provide DDL for all of the tables
involved. If you have some ideas or even just guesses great, if not
then that's ok too.
Thanks,
-Tom.Thomas, see inline
"Thomas R. Hummel" wrote:
> Hello,
> A couple days ago one of our queries suddenly started to perform
> abyssmally. The query is pretty straightforward - it joins several
> tables all on foreign keys and includes a GROUP BY with COUNT(*). I
> looked over the query plan and it looked a little odd so I tried
> cutting the query down to see where the issue might be. I eventually
> came up with the following:
> SELECT COUNT(*)
> FROM Table1 T1
> INNER JOIN Table2 T2 ON T2.table2_id = T1.table2_id
> WHERE T1.my_date = '2004-11-18'
> The table and column names have been changed to protect the innocent,
> but that is the exact format of the tables. Table1 has about 35M
> records. Table2 has about 6.5M records. For the date in question,
> Table1 has about 165K records.
> There is a non-clustered index on T1.my_date and there is a clustered
> index on T2.table2_id.
Consider adding a nonclustered index on T1(my_date,table2_id). This will
prevent the (quite expensive) bookmark lookups.
> The query plan for this simple query does an index seek on T1.my_date
> as I expected then it does a bookmark lookup (presumably because it
> needs T1.table2_id). It then includes parallelism, a hash, and then a
> bitmap creation. Meanwhile, it does an index scan using an index on
> Table2 that includes a single column that isn't even mentioned in the
> query(?!?!). It then uses parallelism and does a hash match/inner
> join.
Apparently SQL-Server estimates that the parallel plan will be faster.
If you expect differently, then you could add the hint OPTION (MAXDOP 1)
to force the serial plan.
Since the index on T2(table2_id) is clustered it is very wide at the
page level. In this case, SQL-Server estimates that it is faster to scan
a nonclustered index of table T2 (which also includes the clustered
index key) than it is to seek (or partially scan) the clustered index
for the estimated rows of the query.
Hope this helps,
Gert-Jan
> I've done UPDATE STATISTICS using WITH FULLSCAN for both tables and
> I've done a DBCC CHECKTABLE on both tables. Neither had any effect. I
> also tried to force the query to use the clustered index for Table2.
> For the simple query above it doesn't seem to help performance as the
> clustered index scan has a very large cost to it (I'm not sure that I
> entirely understand why). In the original query it helps substantially
> though. Instead of joining the 6.5M records to a lookup table first it
> joins it to Table1 first, which cuts down the number of records to the
> 165K before going about with other joins.
> What I'm looking for is any advice on other things that I can look at
> or any ideas on why SQL Server might be making these kinds of choices.
> I would have thought that the simple query above would have performed
> much better than it is currently (~30-35 seconds). I realize that
> there has to be a bookmark lookup, but I was still expecting a quick
> response from the server based on the indexes.
> Because of the table sizes, etc. I don't expect anyone to reproduce my
> results, so please don't ask me to provide DDL for all of the tables
> involved. If you have some ideas or even just guesses great, if not
> then that's ok too.
> Thanks,
> -Tom.|||I fully agree. OPTION (MAXDOP 1) should resolve the problem. In my
experience, UPDATE STATISTICS would temporaily fix it. And index hint,
query hint would also force a right plan (not a best practice though). If
it's from a stored procedure, WITH RECOMPILE would also fix it (not a best
practice).
Gary
SELECT COUNT(*)
> FROM Table1 T1
> INNER JOIN Table2 T2 ON T2.table2_id = T1.table2_id
> WHERE T1.my_date = '2004-11-18'
"Gert-Jan Strik" <sorry@.toomuchspamalready.nl> wrote in message
news:419E4013.6DBC44D@.toomuchspamalready.nl...
> Thomas, see inline
> "Thomas R. Hummel" wrote:
> >
> > Hello,
> >
> > A couple days ago one of our queries suddenly started to perform
> > abyssmally. The query is pretty straightforward - it joins several
> > tables all on foreign keys and includes a GROUP BY with COUNT(*). I
> > looked over the query plan and it looked a little odd so I tried
> > cutting the query down to see where the issue might be. I eventually
> > came up with the following:
> >
> > SELECT COUNT(*)
> > FROM Table1 T1
> > INNER JOIN Table2 T2 ON T2.table2_id = T1.table2_id
> > WHERE T1.my_date = '2004-11-18'
> >
> > The table and column names have been changed to protect the innocent,
> > but that is the exact format of the tables. Table1 has about 35M
> > records. Table2 has about 6.5M records. For the date in question,
> > Table1 has about 165K records.
> >
> > There is a non-clustered index on T1.my_date and there is a clustered
> > index on T2.table2_id.
> Consider adding a nonclustered index on T1(my_date,table2_id). This will
> prevent the (quite expensive) bookmark lookups.
> > The query plan for this simple query does an index seek on T1.my_date
> > as I expected then it does a bookmark lookup (presumably because it
> > needs T1.table2_id). It then includes parallelism, a hash, and then a
> > bitmap creation. Meanwhile, it does an index scan using an index on
> > Table2 that includes a single column that isn't even mentioned in the
> > query(?!?!). It then uses parallelism and does a hash match/inner
> > join.
> Apparently SQL-Server estimates that the parallel plan will be faster.
> If you expect differently, then you could add the hint OPTION (MAXDOP 1)
> to force the serial plan.
> Since the index on T2(table2_id) is clustered it is very wide at the
> page level. In this case, SQL-Server estimates that it is faster to scan
> a nonclustered index of table T2 (which also includes the clustered
> index key) than it is to seek (or partially scan) the clustered index
> for the estimated rows of the query.
> Hope this helps,
> Gert-Jan
> > I've done UPDATE STATISTICS using WITH FULLSCAN for both tables and
> > I've done a DBCC CHECKTABLE on both tables. Neither had any effect. I
> > also tried to force the query to use the clustered index for Table2.
> > For the simple query above it doesn't seem to help performance as the
> > clustered index scan has a very large cost to it (I'm not sure that I
> > entirely understand why). In the original query it helps substantially
> > though. Instead of joining the 6.5M records to a lookup table first it
> > joins it to Table1 first, which cuts down the number of records to the
> > 165K before going about with other joins.
> >
> > What I'm looking for is any advice on other things that I can look at
> > or any ideas on why SQL Server might be making these kinds of choices.
> > I would have thought that the simple query above would have performed
> > much better than it is currently (~30-35 seconds). I realize that
> > there has to be a bookmark lookup, but I was still expecting a quick
> > response from the server based on the indexes.
> >
> > Because of the table sizes, etc. I don't expect anyone to reproduce my
> > results, so please don't ask me to provide DDL for all of the tables
> > involved. If you have some ideas or even just guesses great, if not
> > then that's ok too.
> >
> > Thanks,
> > -Tom.|||Thanks for the suggestions. I had thought of the nonclustered index,
but while that would help with the pared down query that I came up
with, it wouldn't help with the underlying query because that one
involves a lot of additional columns. I'm still considering a covering
index, but I'm not sure why it should be necessary. Due to the number
of columns in the query as well as the number of rows in the table,
I'm a little hesitant to create a covering index.
I may try changing the clustered index for Table1. Right now it is on
an identity column (not my design...) that is also being used as a
surrogate primary key. It makes more sense to me to have that on the
date column since most reports run off of that date column and use
date ranges. This should prevent bookmark lookups for these large
groups of rows as well. When looking up by the primary key it is
usually to grab one row anyway.
Thanks!
-Tom.
Gert-Jan Strik <sorry@.toomuchspamalready.nl> wrote in message news:<419E4013.6DBC44D@.toomuchspamalready.nl>...
> Thomas, see inline
> "Thomas R. Hummel" wrote:
> >
> > Hello,
> >
> > A couple days ago one of our queries suddenly started to perform
> > abyssmally. The query is pretty straightforward - it joins several
> > tables all on foreign keys and includes a GROUP BY with COUNT(*). I
> > looked over the query plan and it looked a little odd so I tried
> > cutting the query down to see where the issue might be. I eventually
> > came up with the following:
> >
> > SELECT COUNT(*)
> > FROM Table1 T1
> > INNER JOIN Table2 T2 ON T2.table2_id = T1.table2_id
> > WHERE T1.my_date = '2004-11-18'
> >
> > The table and column names have been changed to protect the innocent,
> > but that is the exact format of the tables. Table1 has about 35M
> > records. Table2 has about 6.5M records. For the date in question,
> > Table1 has about 165K records.
> >
> > There is a non-clustered index on T1.my_date and there is a clustered
> > index on T2.table2_id.
> Consider adding a nonclustered index on T1(my_date,table2_id). This will
> prevent the (quite expensive) bookmark lookups.
> > The query plan for this simple query does an index seek on T1.my_date
> > as I expected then it does a bookmark lookup (presumably because it
> > needs T1.table2_id). It then includes parallelism, a hash, and then a
> > bitmap creation. Meanwhile, it does an index scan using an index on
> > Table2 that includes a single column that isn't even mentioned in the
> > query(?!?!). It then uses parallelism and does a hash match/inner
> > join.
> Apparently SQL-Server estimates that the parallel plan will be faster.
> If you expect differently, then you could add the hint OPTION (MAXDOP 1)
> to force the serial plan.
> Since the index on T2(table2_id) is clustered it is very wide at the
> page level. In this case, SQL-Server estimates that it is faster to scan
> a nonclustered index of table T2 (which also includes the clustered
> index key) than it is to seek (or partially scan) the clustered index
> for the estimated rows of the query.
> Hope this helps,
> Gert-Jan
> > I've done UPDATE STATISTICS using WITH FULLSCAN for both tables and
> > I've done a DBCC CHECKTABLE on both tables. Neither had any effect. I
> > also tried to force the query to use the clustered index for Table2.
> > For the simple query above it doesn't seem to help performance as the
> > clustered index scan has a very large cost to it (I'm not sure that I
> > entirely understand why). In the original query it helps substantially
> > though. Instead of joining the 6.5M records to a lookup table first it
> > joins it to Table1 first, which cuts down the number of records to the
> > 165K before going about with other joins.
> >
> > What I'm looking for is any advice on other things that I can look at
> > or any ideas on why SQL Server might be making these kinds of choices.
> > I would have thought that the simple query above would have performed
> > much better than it is currently (~30-35 seconds). I realize that
> > there has to be a bookmark lookup, but I was still expecting a quick
> > response from the server based on the indexes.
> >
> > Because of the table sizes, etc. I don't expect anyone to reproduce my
> > results, so please don't ask me to provide DDL for all of the tables
> > involved. If you have some ideas or even just guesses great, if not
> > then that's ok too.
> >
> > Thanks,
> > -Tom.

Tuesday, March 20, 2012

Plz Clarify my query in SSIS

Hi There,

I have Task in SSIS to import the flat file to the table and break the table and insert and update the other tables in the same database.

I searched every where i couldnt find appropriate tutorial for this.

Please advice me how to achieve this task.

Thanks in Advance

Regards

Savera

Savera wrote:

Hi There,

I have Task in SSIS to import the flat file to the table and break the table

What do you mean by "break the table"?

Savera wrote:

and insert and update the other tables in the same database.

What other tables? where are you inserting FROM?

Savera wrote:

I searched every where i couldnt find appropriate tutorial for this. Please advice me how to achieve this task.

Which bit?

Savera wrote:

Thanks in Advance

Regards

Savera

-Jamie

|||Load the table first in one data flow. Then in a second data flow, select from that table as the source. Use a conditional split transformation to direct the rows to other destinations based on your criteria.|||

HI Jamie,

Thanks a lot.

I have some more queries to clarify.

I have some complicated criteria like join the tables and set the flag in main table if any of the table updation tasks fails.Will it be done in Conditional split Transformation if its not please let me know how to get this task done.

Thanks in Advance.

Regards

|||

Savera wrote:

HI Jamie,

Thanks a lot.

I have some more queries to clarify.

I have some complicated criteria like join the tables and set the flag in main table if any of the table updation tasks fails.Will it be done in Conditional split Transformation if its not please let me know how to get this task done.

Thanks in Advance.

Regards

To set a flag in a table you would probably use an Execute SQL Task. Put an OnError precedence constraint between your data-flow and this new Execute SQL Task. Something like that anyway - I don't really understand why you're talking about a conditional split.

-Jamie

|||

Jamie,

Thanks for the reply.

I wanted to ask you that whether complicated query can be set in conditional split transformation or have to use Execute sql task ?

Please let me know how to put an OnError precedence constraint between your data-flow and this new Execute SQL.

Ans also i am getting an error while mapping between flat file to database tables the error is column cannot convert between unicode and non unicode string data types.Please advice how it can be solved.

Many thanks in Advance.

Regards,

|||

Savera wrote:

Jamie,

Thanks for the reply.

I wanted to ask you that whether complicated query can be set in conditional split transformation or have to use Execute sql task ?

This makes no snse. You cannot execute queries from the Conditional Split component.

Savera wrote:

Please let me know how to put an OnError precedence constraint between your data-flow and this new Execute SQL.

Drag a precedence constraint between the two tasks (it will be OnSuccessby default) and edit the properties of it. Make it an OnError constraint.

Savera wrote:

Ans also i am getting an error while mapping between flat file to database tables the error is column cannot convert between unicode and non unicode string data types.Please advice how it can be solved.

Somewhere you are trying to push a unicode value into a non-unicode field. You should use a Data Conversion component to explicitly make the change that you need.

-Jamie

|||Savera,
Please read through my posts in this thread. I think you should go through some tutorials so that you can obtain a better understanding of SSIS.|||

Phil Brammer wrote:

Savera,
Please read through my posts in this thread. I think you should go through some tutorials so that you can obtain a better understanding of SSIS.

Agreed.

This may be of use:

Online Beginner Resources
(http://blogs.conchango.com/jamiethomson/archive/2007/01/30/SSIS_3A00_-Online-Beginner-Resources.aspx)

-Jamie

Monday, March 12, 2012

Pls help in making this proc work

Hi,

I just found a procedure to make pivot tables,But iam getting an error,can someone help in Overcoming the error.

The syntax is as below

CREATE PROCEDURE crosstab

@.select varchar(8000),

@.sumfunc varchar(100),

@.pivot varchar(100),

@.table varchar(100)

AS

DECLARE @.sql varchar(8000), @.delim varchar(1)

SET NOCOUNT ON

SET ANSI_WARNINGS OFF

EXEC ('SELECT ' + @.pivot + ' AS pivot INTO ##pivot FROM ' + @.table + ' WHERE 1=2')

EXEC ('INSERT INTO ##pivot SELECT DISTINCT ' + @.pivot + ' FROM ' + @.table + ' WHERE '

+ @.pivot + ' Is Not Null')

SELECT @.sql='', @.sumfunc=stuff(@.sumfunc, len(@.sumfunc), 1, ' END)' )

SELECT @.delim=CASE Sign( CharIndex('char', data_type)+CharIndex('date', data_type) )

WHEN 0 THEN '' ELSE '''' END

FROM tempdb.information_schema.columns

WHERE table_name='##pivot' AND column_name='pivot'

SELECT @.sql= @.sql + '''' + convert(varchar(100), pivot) + ''' = ' +

stuff(@.sumfunc,charindex( '(', @.sumfunc )+1, 0, ' CASE ' + @.pivot + ' WHEN '

+ @.delim + convert(varchar(100), pivot) + @.delim + ' THEN ' ) + ', ' FROM ##pivot

DROP TABLE ##pivot

SELECT @.sql=left(@.sql, len(@.sql)-1)

SELECT @.select=stuff(@.select, charindex(' FROM ', @.select)+1, 0, ', ' + @.sql + ' ')

EXEC (@.select)

SET ANSI_WARNINGS ON

just run the procedure and help me to fix the error.The error iam getting is

Msg 156, Level 15, State 1, Procedure crosstab, Line 23

Incorrect syntax near the keyword 'pivot'.

Any help is greatly apprecited.

Thanks,

SVGP

We will need a little more information to help you debug this.

Please provide DDL (Create statements for any tables involved), Sample data (In the form of Insert statements) and the command you are using to execute this stored Procedure (Including parameters)

|||

Hi,

There are so many tables involved with lots of data.

But the problem is not during the execution of proc,its while creating the proc,which doesnot involve any of the tables.

If still you require i will send them,

Thanks,

SVGP

|||

Where you have:

convert(varchar(100), pivot)

Change to

convert(varchar(100), [pivot])

PIVOT is a reserverd word in SQL2005.

(I assume that pivot is a column name?)

HTH!

|||

Yes you are right Thanks a lot

SVGP.

|||

Pls do the following corrections,

Code Snippet

CREATE PROCEDURE crosstab

@.select varchar(8000),

@.sumfunc varchar(100),

@.pivot varchar(100),

@.table varchar(100)

AS

DECLARE @.sql varchar(8000), @.delim varchar(1)

SET NOCOUNT ON

SET ANSI_WARNINGS OFF

EXEC ('SELECT ' + @.pivot + ' AS [pivot] INTO ##pivot FROM ' + @.table + ' WHERE 1=2')

EXEC ('INSERT INTO ##pivot SELECT DISTINCT ' + @.pivot + ' FROM ' + @.table + ' WHERE '

+ @.pivot + ' Is Not Null')

SELECT @.sql='', @.sumfunc=stuff(@.sumfunc, len(@.sumfunc), 1, ' END)' )

SELECT @.delim=CASE Sign( CharIndex('char', data_type)+CharIndex('date', data_type) )

WHEN 0 THEN '' ELSE '''' END

FROM tempdb.information_schema.columns

WHERE table_name='##pivot' AND column_name='pivot'

SELECT @.sql= @.sql + '''' + convert(varchar(100), [pivot]) + ''' = ' +

stuff(@.sumfunc,charindex( '(', @.sumfunc )+1, 0, ' CASE ' + @.pivot + ' WHEN '

+ @.delim + convert(varchar(100), [pivot]) + @.delim + ' THEN ' ) + ', ' FROM ##pivot

DROP TABLE ##pivot

SELECT @.sql=left(@.sql, len(@.sql)-1)

SELECT @.select=stuff(@.select, charindex(' FROM ', @.select)+1, 0, ', ' + @.sql + ' ')

EXEC (@.select)

SET ANSI_WARNINGS ON

Friday, March 9, 2012

Please take a look... Database changes not maintained between VS2K5pro and SQLServer Dev V

Well that's pretty much it. I discovered this when I added tables to a database from within VS2K5. The tables are visible in VS but not in the server management studio.

To clarify further...I added a db to a website in VS. I then used the server management studio to delete tables from the db. They appear to be gone in server management studio, but are still visible within VS, even after a refresh and shut down/restart of VS.

I don't get it. What am I missing here? This is killing me.

Any thoughts?

The only other thing I can think to add is that I originally created the db in question from within VS2K5. I did nothing I am aware of to make it act differently than any other db. So why it shows up in the server management studio but changes I make aren't consistently maintained between there and VS2K5, I do not understand.

TIA - Regards,

Joe

>>Any thoughts?

It sounds like you have two separate databases. Try searching your hard drive for all *.mdf files (you'll need to use search's advanced options and enable searching for System folders.

|||

OK now I am even more confused...

I do more than one copy. But WHY? I initially created this database from within VS2K5. I ended up scrapping the project I used to create it, but kept the database. I then created a new project in VS2K5. I added an existing item, not created new, and added the database to the new project. So how am I getting a second, third etc. copy, and why? Should the added database not actually be the original database? Or is there a setting somewhere I turned on and didn't know that causes a new instance to be created?

Because of my ignorance on the issue, I have no idea how to resolve this.

Thanks

Joe

|||

Hi,

Are you using the Server Explorer to check your database in VS2005? If so, please right click on the server, and click refresh to refresh the treeview.

If not, please let me know where you find the change does not take effect in VS2005.

Thanks!

|||

I think I have this sorted out, although I am not yet clear on why it happened.

Long story short I decided to think very carefully about every step in the process of adding an exisiting database, and the subsequent changing of it. I noticed something I had missed before. At some point the drop down list for the source in the add db dialog was changed from SQL Server to SQL database. It appears clear this was causing the issue as when I changed it back and added the existing db I do not get a new copy created within my app folder.

I am sure there is a perfectly good reason for this that easily understood by someone with more knowledge than I, but at least it appears I found the problem. I will post back once I have had an opportunity to test this a bit and make sure I'm right. Thanks for the replies, I appreciate the help.

Regards,

Joe

Wednesday, March 7, 2012

Please setup information of sql server database on web server

I have create database name and userid and password and now i want to create tables on sql server through enterprise manager. I have problem to connect registration.

Check the instructional videos on this site:

http://msdn.microsoft.com/vstudio/express/sql/learning/default.aspx#1

|||Unless you do not post your exact error you get here, we won′t be able to help you, if you are new to SQL Server and need rampup assitance you should stick to the link Arnie posted above.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

Please Please Help with C# and ASP.net

I am trying to do an inner join on two tables with the following look
Table Name: Event
Event.event_id (primary key)
Event.venue_id
Event.artist_id
Event.date_time
Table Name: Venue
Venue.venue_id
Venue.name
Venue.city
Venue.state
I want to be able to display them but i get an error with the following code
SqlConnection conn = new SqlConnection(connect_string);
string query ="SELECT Event.date_time, Event.venue_id, Venue.city, Venue.name,Venue.state"
+ "FROM Event, Venue WHERE Event.artist_id=" +art_id + "AND Event.venue_id=Venue.venue_id ORDER BY Event.date_timeASC";
SqlCommand cmd = new SqlCommand(query, conn);
SqlDataAdapter adp = new SqlDataAdapter();
adp.SelectCommand = cmd;
DataSet ds = new DataSet();
adp.Fill(ds,"Event"); //Error below falls on this line of code.
foreach (DataRow dr in ds.Tables["Event"].Rows)
{
date_label.Text += dr["Event.date_time"].ToString()+ "<br>";
}
How do i do this join and be able to output the information of the Event.date_time, Venue.city, Venue.name, Venue.state
I get the following error

The column prefix 'Event' does not match with a table name or alias name used in the query. The column prefix 'Event' does not match with a table name or alias name used in the query. The column prefix 'Venue' does not match with a table name or alias name used in the query. The column prefix 'Venue' does not match with a table name or alias name used in the query. The column prefix 'Venue' does not match with a table name or alias name used in the query. The column prefix 'Event' does not match with a table name or alias name used in the query. The column prefix 'Event' does not match with a table name or alias name used in the query. The column prefix 'Venue' does not match with a table name or alias name used in the query.


(1) It would look like"
SELECT Event.date_time, Event.venue_id, Venue.city, Venue.name,Venue.state"
+ "FROM Event INNER JOIN Venue ON Event.venue_id=Venue.venue_id WHERE Event.artist_id=@.artId ORDER BY Event.date_timeASC";
(2) Notice I have used @.artId.You should be using parameterized queriesto prevent SQL Injection attack ( a simple google search on this willgive you enough information).
|||Your string:
string query ="SELECT Event.date_time, Event.venue_id, Venue.city, Venue.name,Venue.state"
+ "FROM Event, Venue WHERE Event.artist_id=" +art_id + "AND Event.venue_id=Venue.venue_id ORDER BY Event.date_timeASC";
Should be:
string query ="SELECT Event.date_time, Event.venue_id, Venue.city, Venue.name,Venue.state "
+ "FROM Event, Venue WHERE Event.artist_id=" +art_id + "AND Event.venue_id=Venue.venue_id ORDER BY Event.date_timeASC";
(I added a space at the end of the first line. The "Venue.state" and "FROM" were concatenated)
|||Thanks for pointing that out scampbell12001.

please I need this!

hi all

Any body knows where I can get the SQL Versión: 8.0 Service Pack 3 ?.
this SP3 allow create, edit, delete tables from VS.NET 2003.

or I'm wrong?

please anybody?SQL Server 2000 SP3 is downloadable from the MS SQL server website.

Please help: Views and INSTEAD OF UPDATE trigger

Hi:

Currently I have two tables T1 and T2. A view V1 is defined over T1 with an INSTEAD OF UPDATE trigger and another view V2 is defined over V1 and T2 with another INSTEAD OF UPDATE trigger. Unfortunately, inside V2s trigger following update statement is not working:
Update V1 set V1.name = i.name from inserted i
because SQL server complains:
View 'V1' has an INSTEAD OF UPDATE trigger and cannot be a target of an UPDATE FROM statement.
Is there any way to get around this problem? I.e., how can I make the INSTEAD OF UPDATE trigger in V2 to work if I cant reference inserted?

Your help is appreciated,

JeffI think the problem is not with your "inserted" table, but with the target of the insert (View V1).

Modify your INSTEAD OF triggers so that they reference the underlying tables directly, rather than through secondary views.

Saturday, February 25, 2012

Please Help....MS Access from SQL Server 7

Is it possible to access MS Access tables from SQL S7? I do not have a database on SQL S7 and as such cannot create tables or even import tables from external sources (IT policies !!). As such I was wondering if you can connect directly to MS Access and query the data held within said database through SQL S7?

Thanks Guys and Gals.....Create link tables to the SQL db via ODBC. Then you can just code any connection to a listbox as usual (i.e. thru a table).


And use Books online as a resource to create linked server to MS Access.

Please help.......Sql problem

I am new in sql .....and now I have 2 tables. The first table name Table1 have 3 feilds
id idName Name
1 223 John
2 32 Tim
3 443 Carty
4 111 Timmy
5 27 Jam
6 790 Max

The second tables name Table2 have 3 fields
idName info Co
32 animal 4
32 product 3
32 city 2
790 hat 3
223 color 2
223 rat 1
111 home 1

I want the result to display the highest number of from Co field ...This is an example of the result that I am trying to do. Anyone have any comment ......... :eek: :o

idName Name info Co
32 Tim animal 4
790 Max hat 3
223 John color 2
111 Timmy home 1this should do:

select *
from tb1 join (select * from tb2 x
where x.co=(select max(co) from tb2 y
where y.idname=x.idname)) t2 on tb1.idname=t2.idname

Please help. i need to create an XSD and dont know how!

hello all.
i attached an xml that need to put data into and sql server tables
i having probleams creating the XSD schema.
i allready have the tables in the sql
i am using the SQLXMLBulkLoad object. and wrote a program with vb.net that
do it.
it's work fine for simple xml and Xsd .
i need help writing the xsd that will insert to data into 2 tables with
relation (that i created )
attached the xml
please help
thanks
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<JOB_NUMBER>3</JOB_NUMBER>
<JOB_TYPE>STANDARD</JOB_TYPE>
<ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>WC E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>10000</ASSEMBLY_QUANTITY>
<CUSTOMER_NUMBER>??? ?????? ?????</CUSTOMER_NUMBER>
<PRODUCTION_LINE>L02</PRODUCTION_LINE>
<BULK_DENSITY>122</BULK_DENSITY>
<PPG>AS33</PPG>
<HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Released</JOB_STATUS>
<LOT_NUMBER>3</LOT_NUMBER>
<COMPONENTS>
<COMPONENTS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>GILADI-510 CHALK</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>1200</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>DOP
DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>3220</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>EDENOL D-82,HENKEL</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>160</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
E2400L</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>50</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
2WH1061</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>100</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>SOLVIN 270PF
SOLVAY</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>5020</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
</COMPONENTS>
<OPERATIONS>
<OPERATIONS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>ELEC02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>2.5</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>SETUP02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>42.999656</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PROD02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>30.0003</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>NONPROD02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>COLORMAT02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>4</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PREMIX02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>4</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
</OPERATIONS>
</ROW>
<ROW num="2">
<JOB_NUMBER>4</JOB_NUMBER>
<JOB_TYPE>PACKING</JOB_TYPE>
<ASSEMBLY_NUMBER>11PVCNZ0004B</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>SOLVIN 270PF SOLVAY</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>100</ASSEMBLY_QUANTITY>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Unreleased</JOB_STATUS>
<COMPONENTS/>
<OPERATIONS/>
</ROW>
<ROW num="3">
<JOB_NUMBER>5</JOB_NUMBER>
<JOB_TYPE>PACKING</JOB_TYPE>
<ASSEMBLY_NUMBER>347200000000</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>P.V.C SOFT 472/NAT.0000</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>100</ASSEMBLY_QUANTITY>
<BULK_DENSITY>44949</BULK_DENSITY>
<PPG>JHY0992</PPG>
<HUMIDITY__PERMITTED>0.998</HUMIDITY__PERMITTED>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Unreleased</JOB_STATUS>
<COMPONENTS/>
<OPERATIONS/>
</ROW>
<ROW num="4">
<JOB_NUMBER>6</JOB_NUMBER>
<JOB_TYPE>STANDARD</JOB_TYPE>
<ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>2</ASSEMBLY_QUANTITY>
<BULK_DENSITY>122</BULK_DENSITY>
<PPG>AS33</PPG>
<HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Released</JOB_STATUS>
<LOT_NUMBER>6</LOT_NUMBER>
<COMPONENTS>
<COMPONENTS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>GILADI-510 CHALK</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.24</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>DOP
DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.644</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>EDENOL D-82,HENKEL</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.032</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
E2400L</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.01</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
2WH1061</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.02</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>SOLVIN 270PF
SOLVAY</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>1.004</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
</COMPONENTS>
<OPERATIONS>
<OPERATIONS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>ELEC04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>7.518797</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>SETUP04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>40</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PROD04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>23.809524</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>NONPROD04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>COLORMAT04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PREMIX04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
</OPERATIONS>
</ROW>
<ROW num="5">
<JOB_NUMBER>7</JOB_NUMBER>
<JOB_TYPE>STANDARD</JOB_TYPE>
<ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>1</ASSEMBLY_QUANTITY>
<BULK_DENSITY>122</BULK_DENSITY>
<PPG>AS33</PPG>
<HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Complete</JOB_STATUS>
<LOT_NUMBER>7</LOT_NUMBER>
<COMPONENTS>
<COMPONENTS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>GILADI-510 CHALK</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.12</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>DOP
DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.322</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>EDENOL D-82,HENKEL</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.016</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
E2400L</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.005</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
2WH1061</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.01</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>SOLVIN 270PF
SOLVAY</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.502</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="7">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>14STBLX00034</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>AKROPAN 2143GX
AKDENIZ</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.025536</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
</COMPONENTS>
<OPERATIONS>
<OPERATIONS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>ELEC04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>7.518797</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>SETUP04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>40</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PROD04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>23.809524</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>NONPROD04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>COLORMAT04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PREMIX04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
</OPERATIONS>
</ROW>
<ROW num="6">
<JOB_NUMBER>9</JOB_NUMBER>
<JOB_TYPE>PACKING</JOB_TYPE>
<ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>1</ASSEMBLY_QUANTITY>
<CUSTOMER_NUMBER>??? ?????? ?????</CUSTOMER_NUMBER>
<PACK_TYPE>PE BAG WITHOUT LOGO</PACK_TYPE>
<PACK_CODE>PBR</PACK_CODE>
<PALLET_SIZE_TYPE>TELMA PALLET HOLIS</PALLET_SIZE_TYPE>
<MARKED_PACK>REGULAR STANDARD LABEL</MARKED_PACK>
<BULK_DENSITY>122</BULK_DENSITY>
<PPG>AS33</PPG>
<HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Complete</JOB_STATUS>
<LOT_NUMBER>010508001</LOT_NUMBER>
<COMPONENTS>
<COMPONENTS_ROW num="1">
<OPERATION_SEQ_NUM>1</OPERATION_SEQ_NUM>
<COMPONENT_ITEM>3E1120102390</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>W&C
E-112/WHITE-1239</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>1</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
</COMPONENTS>
<OPERATIONS/>
</ROW>
</ROWSET>
Here is what I do.
Read this into a data set and then write it out using the WriteXMLSchema
method.
Here is a brief example in c#.
DataSet ds = new DataSet("MyXML");
ds.ReadXml("C:\\c53a1602ff3011d48d140004ac5e3ab0.x ml");
ds.WriteXmlSchema("C:\\MyXML.xsd");
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"sqlxml problem Please help"
<sqlxmlproblemPleasehelp@.discussions.microsoft.com > wrote in message
news:3B1097A3-88B2-432F-8CA9-FACB0C063997@.microsoft.com...
> hello all.
> i attached an xml that need to put data into and sql server tables
> i having probleams creating the XSD schema.
> i allready have the tables in the sql
> i am using the SQLXMLBulkLoad object. and wrote a program with vb.net
> that
> do it.
> it's work fine for simple xml and Xsd .
> i need help writing the xsd that will insert to data into 2 tables with
> relation (that i created )
> attached the xml
> please help
> thanks
>
> <?xml version = '1.0'?>
> <ROWSET>
> <ROW num="1">
> <JOB_NUMBER>3</JOB_NUMBER>
> <JOB_TYPE>STANDARD</JOB_TYPE>
> <ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>WC E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>10000</ASSEMBLY_QUANTITY>
> <CUSTOMER_NUMBER>? ? ??</CUSTOMER_NUMBER>
> <PRODUCTION_LINE>L02</PRODUCTION_LINE>
> <BULK_DENSITY>122</BULK_DENSITY>
> <PPG>AS33</PPG>
> <HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Released</JOB_STATUS>
> <LOT_NUMBER>3</LOT_NUMBER>
> <COMPONENTS>
> <COMPONENTS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>GILADI-510
> CHALK</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>1200</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>DOP
> DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>3220</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>EDENOL
> D-82,HENKEL</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>160</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
> E2400L</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>50</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
> 2WH1061</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>100</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>SOLVIN 270PF
> SOLVAY</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>5020</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> </COMPONENTS>
> <OPERATIONS>
> <OPERATIONS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>ELEC02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>2.5</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>SETUP02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>42.999656</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PROD02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>30.0003</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>NONPROD02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>COLORMAT02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>4</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PREMIX02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>4</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> </OPERATIONS>
> </ROW>
> <ROW num="2">
> <JOB_NUMBER>4</JOB_NUMBER>
> <JOB_TYPE>PACKING</JOB_TYPE>
> <ASSEMBLY_NUMBER>11PVCNZ0004B</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>SOLVIN 270PF SOLVAY</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>100</ASSEMBLY_QUANTITY>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Unreleased</JOB_STATUS>
> <COMPONENTS/>
> <OPERATIONS/>
> </ROW>
> <ROW num="3">
> <JOB_NUMBER>5</JOB_NUMBER>
> <JOB_TYPE>PACKING</JOB_TYPE>
> <ASSEMBLY_NUMBER>347200000000</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>P.V.C SOFT 472/NAT.0000</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>100</ASSEMBLY_QUANTITY>
> <BULK_DENSITY>44949</BULK_DENSITY>
> <PPG>JHY0992</PPG>
> <HUMIDITY__PERMITTED>0.998</HUMIDITY__PERMITTED>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Unreleased</JOB_STATUS>
> <COMPONENTS/>
> <OPERATIONS/>
> </ROW>
> <ROW num="4">
> <JOB_NUMBER>6</JOB_NUMBER>
> <JOB_TYPE>STANDARD</JOB_TYPE>
> <ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>2</ASSEMBLY_QUANTITY>
> <BULK_DENSITY>122</BULK_DENSITY>
> <PPG>AS33</PPG>
> <HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Released</JOB_STATUS>
> <LOT_NUMBER>6</LOT_NUMBER>
> <COMPONENTS>
> <COMPONENTS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>GILADI-510
> CHALK</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.24</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>DOP
> DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.644</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>EDENOL
> D-82,HENKEL</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.032</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
> E2400L</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.01</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
> 2WH1061</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.02</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>SOLVIN 270PF
> SOLVAY</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>1.004</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> </COMPONENTS>
> <OPERATIONS>
> <OPERATIONS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>ELEC04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>7.518797</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>SETUP04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>40</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PROD04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>23.809524</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>NONPROD04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>COLORMAT04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PREMIX04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> </OPERATIONS>
> </ROW>
> <ROW num="5">
> <JOB_NUMBER>7</JOB_NUMBER>
> <JOB_TYPE>STANDARD</JOB_TYPE>
> <ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>1</ASSEMBLY_QUANTITY>
> <BULK_DENSITY>122</BULK_DENSITY>
> <PPG>AS33</PPG>
> <HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Complete</JOB_STATUS>
> <LOT_NUMBER>7</LOT_NUMBER>
> <COMPONENTS>
> <COMPONENTS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>GILADI-510
> CHALK</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.12</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>DOP
> DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.322</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>EDENOL
> D-82,HENKEL</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.016</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
> E2400L</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.005</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
> 2WH1061</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.01</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>SOLVIN 270PF
> SOLVAY</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.502</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="7">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>14STBLX00034</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>AKROPAN 2143GX
> AKDENIZ</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.025536</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> </COMPONENTS>
> <OPERATIONS>
> <OPERATIONS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>ELEC04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>7.518797</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>SETUP04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>40</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PROD04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>23.809524</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>NONPROD04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>COLORMAT04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PREMIX04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> </OPERATIONS>
> </ROW>
> <ROW num="6">
> <JOB_NUMBER>9</JOB_NUMBER>
> <JOB_TYPE>PACKING</JOB_TYPE>
> <ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>1</ASSEMBLY_QUANTITY>
> <CUSTOMER_NUMBER>? ? ??</CUSTOMER_NUMBER>
> <PACK_TYPE>PE BAG WITHOUT LOGO</PACK_TYPE>
> <PACK_CODE>PBR</PACK_CODE>
> <PALLET_SIZE_TYPE>TELMA PALLET HOLIS</PALLET_SIZE_TYPE>
> <MARKED_PACK>REGULAR STANDARD LABEL</MARKED_PACK>
> <BULK_DENSITY>122</BULK_DENSITY>
> <PPG>AS33</PPG>
> <HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Complete</JOB_STATUS>
> <LOT_NUMBER>010508001</LOT_NUMBER>
> <COMPONENTS>
> <COMPONENTS_ROW num="1">
> <OPERATION_SEQ_NUM>1</OPERATION_SEQ_NUM>
> <COMPONENT_ITEM>3E1120102390</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>W&C
> E-112/WHITE-1239</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>1</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> </COMPONENTS>
> <OPERATIONS/>
> </ROW>
> </ROWSET>
|||Dear Hilary
i need to write a Mapping Scehma.
which i do not know to to do.
can you please help me.
i allredy write a source in vb.net that read the XML and The XSD and insert
into SQL
all i need is the right schema according to the XML below
thanks.
"Hilary Cotter" wrote:
[vbcol=seagreen]
> Here is what I do.
> Read this into a data set and then write it out using the WriteXMLSchema
> method.
> Here is a brief example in c#.
> DataSet ds = new DataSet("MyXML");
> ds.ReadXml("C:\\c53a1602ff3011d48d140004ac5e3ab0.x ml");
> ds.WriteXmlSchema("C:\\MyXML.xsd");
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "sqlxml problem Please help"
> <sqlxmlproblemPleasehelp@.discussions.microsoft.com > wrote in message
> news:3B1097A3-88B2-432F-8CA9-FACB0C063997@.microsoft.com...
|||I normally do this as part of a manual process. I create stored procedures
to fire the xml data into the respective tables.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"sqlxml problem Please help"
<sqlxmlproblemPleasehelp@.discussions.microsoft.com > wrote in message
news:1D7DBF7A-E015-448C-883C-72839C357484@.microsoft.com...[vbcol=seagreen]
> Dear Hilary
> i need to write a Mapping Scehma.
> which i do not know to to do.
> can you please help me.
> i allredy write a source in vb.net that read the XML and The XSD and
> insert
> into SQL
> all i need is the right schema according to the XML below
> thanks.
> "Hilary Cotter" wrote:
|||You can also open the Xml file in the Xml editor (in VS 2005) and click on
the create schema icon.
To get the mapping information check-out the SQLXML help.
Thanks,
Avner Aharoni[MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Hilary Cotter" wrote:
[vbcol=seagreen]
> I normally do this as part of a manual process. I create stored procedures
> to fire the xml data into the respective tables.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "sqlxml problem Please help"
> <sqlxmlproblemPleasehelp@.discussions.microsoft.com > wrote in message
> news:1D7DBF7A-E015-448C-883C-72839C357484@.microsoft.com...

Please help. i need to create an XSD and dont know how!

hello all.
i attached an xml that need to put data into and sql server tables
i having probleams creating the XSD schema.
i allready have the tables in the sql
i am using the SQLXMLBulkLoad object. and wrote a program with vb.net that
do it.
it's work fine for simple xml and Xsd .
i need help writing the xsd that will insert to data into 2 tables with
relation (that i created )
attached the xml
please help
thanks
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<JOB_NUMBER>3</JOB_NUMBER>
<JOB_TYPE>STANDARD</JOB_TYPE>
<ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>WC E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>10000</ASSEMBLY_QUANTITY>
<CUSTOMER_NUMBER>??? ?????? ?????</CUSTOMER_NUMBER>
<PRODUCTION_LINE>L02</PRODUCTION_LINE>
<BULK_DENSITY>122</BULK_DENSITY>
<PPG>AS33</PPG>
<HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Released</JOB_STATUS>
<LOT_NUMBER>3</LOT_NUMBER>
<COMPONENTS>
<COMPONENTS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>GILADI-510 CHALK</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>1200</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>DOP
DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>3220</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>EDENOL D-82,HENKEL</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>160</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
E2400L</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>50</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
2WH1061</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>100</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>SOLVIN 270PF
SOLVAY</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>5020</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
</COMPONENTS>
<OPERATIONS>
<OPERATIONS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>ELEC02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>2.5</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>SETUP02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>42.999656</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PROD02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>30.0003</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>NONPROD02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>COLORMAT02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>4</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PREMIX02</RESOURCE_CODE>
<REQUIRED_PRODUCTION>4</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
</OPERATIONS>
</ROW>
<ROW num="2">
<JOB_NUMBER>4</JOB_NUMBER>
<JOB_TYPE>PACKING</JOB_TYPE>
<ASSEMBLY_NUMBER>11PVCNZ0004B</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>SOLVIN 270PF SOLVAY</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>100</ASSEMBLY_QUANTITY>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Unreleased</JOB_STATUS>
<COMPONENTS/>
<OPERATIONS/>
</ROW>
<ROW num="3">
<JOB_NUMBER>5</JOB_NUMBER>
<JOB_TYPE>PACKING</JOB_TYPE>
<ASSEMBLY_NUMBER>347200000000</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>P.V.C SOFT 472/NAT.0000</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>100</ASSEMBLY_QUANTITY>
<BULK_DENSITY>44949</BULK_DENSITY>
<PPG>JHY0992</PPG>
<HUMIDITY__PERMITTED>0.998</HUMIDITY__PERMITTED>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Unreleased</JOB_STATUS>
<COMPONENTS/>
<OPERATIONS/>
</ROW>
<ROW num="4">
<JOB_NUMBER>6</JOB_NUMBER>
<JOB_TYPE>STANDARD</JOB_TYPE>
<ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>2</ASSEMBLY_QUANTITY>
<BULK_DENSITY>122</BULK_DENSITY>
<PPG>AS33</PPG>
<HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Released</JOB_STATUS>
<LOT_NUMBER>6</LOT_NUMBER>
<COMPONENTS>
<COMPONENTS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>GILADI-510 CHALK</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.24</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>DOP
DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.644</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>EDENOL D-82,HENKEL</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.032</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
E2400L</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.01</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
2WH1061</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.02</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>SOLVIN 270PF
SOLVAY</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>1.004</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
</COMPONENTS>
<OPERATIONS>
<OPERATIONS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>ELEC04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>7.518797</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>SETUP04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>40</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PROD04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>23.809524</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>NONPROD04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>COLORMAT04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PREMIX04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
</OPERATIONS>
</ROW>
<ROW num="5">
<JOB_NUMBER>7</JOB_NUMBER>
<JOB_TYPE>STANDARD</JOB_TYPE>
<ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>1</ASSEMBLY_QUANTITY>
<BULK_DENSITY>122</BULK_DENSITY>
<PPG>AS33</PPG>
<HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Complete</JOB_STATUS>
<LOT_NUMBER>7</LOT_NUMBER>
<COMPONENTS>
<COMPONENTS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>GILADI-510 CHALK</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.12</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>DOP
DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.322</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>EDENOL D-82,HENKEL</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.016</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
E2400L</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.005</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
2WH1061</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.01</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>SOLVIN 270PF
SOLVAY</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.502</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
<COMPONENTS_ROW num="7">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<DEPARTMENT>PVC</DEPARTMENT>
<COMPONENT_ITEM>14STBLX00034</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>AKROPAN 2143GX
AKDENIZ</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>0.025536</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
</COMPONENTS>
<OPERATIONS>
<OPERATIONS_ROW num="1">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>ELEC04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>7.518797</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="2">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>SETUP04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>40</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="3">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PROD04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>23.809524</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="4">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>NONPROD04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="5">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>COLORMAT04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
<OPERATIONS_ROW num="6">
<OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
<RESOURCE_CODE>PREMIX04</RESOURCE_CODE>
<REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
</OPERATIONS_ROW>
</OPERATIONS>
</ROW>
<ROW num="6">
<JOB_NUMBER>9</JOB_NUMBER>
<JOB_TYPE>PACKING</JOB_TYPE>
<ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
<ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
<ASSEMBLY_QUANTITY>1</ASSEMBLY_QUANTITY>
<CUSTOMER_NUMBER>??? ?????? ?????</CUSTOMER_NUMBER>
<PACK_TYPE>PE BAG WITHOUT LOGO</PACK_TYPE>
<PACK_CODE>PBR</PACK_CODE>
<PALLET_SIZE_TYPE>TELMA PALLET HOLIS</PALLET_SIZE_TYPE>
<MARKED_PACK>REGULAR STANDARD LABEL</MARKED_PACK>
<BULK_DENSITY>122</BULK_DENSITY>
<PPG>AS33</PPG>
<HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
<ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
<JOB_STATUS>Complete</JOB_STATUS>
<LOT_NUMBER>010508001</LOT_NUMBER>
<COMPONENTS>
<COMPONENTS_ROW num="1">
<OPERATION_SEQ_NUM>1</OPERATION_SEQ_NUM>
<COMPONENT_ITEM>3E1120102390</COMPONENT_ITEM>
<COMPONENT_DESCRIPTION>W&C
E-112/WHITE-1239</COMPONENT_DESCRIPTION>
<COMPONENT_QUANTITY>1</COMPONENT_QUANTITY>
<REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
</COMPONENTS_ROW>
</COMPONENTS>
<OPERATIONS/>
</ROW>
</ROWSET>Here is what I do.
Read this into a data set and then write it out using the WriteXMLSchema
method.
Here is a brief example in c#.
DataSet ds = new DataSet("MyXML");
ds.ReadXml("C:\\c53a1602ff3011d48d140004ac5e3ab0.xml");
ds.WriteXmlSchema("C:\\MyXML.xsd");
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"sqlxml problem Please help"
<sqlxmlproblemPleasehelp@.discussions.microsoft.com> wrote in message
news:3B1097A3-88B2-432F-8CA9-FACB0C063997@.microsoft.com...
> hello all.
> i attached an xml that need to put data into and sql server tables
> i having probleams creating the XSD schema.
> i allready have the tables in the sql
> i am using the SQLXMLBulkLoad object. and wrote a program with vb.net
> that
> do it.
> it's work fine for simple xml and Xsd .
> i need help writing the xsd that will insert to data into 2 tables with
> relation (that i created )
> attached the xml
> please help
> thanks
>
> <?xml version = '1.0'?>
> <ROWSET>
> <ROW num="1">
> <JOB_NUMBER>3</JOB_NUMBER>
> <JOB_TYPE>STANDARD</JOB_TYPE>
> <ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>WC E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>10000</ASSEMBLY_QUANTITY>
> <CUSTOMER_NUMBER>? ' '?</CUSTOMER_NUMBER>
> <PRODUCTION_LINE>L02</PRODUCTION_LINE>
> <BULK_DENSITY>122</BULK_DENSITY>
> <PPG>AS33</PPG>
> <HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Released</JOB_STATUS>
> <LOT_NUMBER>3</LOT_NUMBER>
> <COMPONENTS>
> <COMPONENTS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>GILADI-510
> CHALK</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>1200</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>DOP
> DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>3220</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>EDENOL
> D-82,HENKEL</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>160</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
> E2400L</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>50</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
> 2WH1061</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>100</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>SOLVIN 270PF
> SOLVAY</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>5020</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/28/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> </COMPONENTS>
> <OPERATIONS>
> <OPERATIONS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>ELEC02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>2.5</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>SETUP02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>42.999656</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PROD02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>30.0003</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>NONPROD02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>COLORMAT02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>4</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PREMIX02</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>4</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> </OPERATIONS>
> </ROW>
> <ROW num="2">
> <JOB_NUMBER>4</JOB_NUMBER>
> <JOB_TYPE>PACKING</JOB_TYPE>
> <ASSEMBLY_NUMBER>11PVCNZ0004B</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>SOLVIN 270PF SOLVAY</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>100</ASSEMBLY_QUANTITY>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Unreleased</JOB_STATUS>
> <COMPONENTS/>
> <OPERATIONS/>
> </ROW>
> <ROW num="3">
> <JOB_NUMBER>5</JOB_NUMBER>
> <JOB_TYPE>PACKING</JOB_TYPE>
> <ASSEMBLY_NUMBER>347200000000</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>P.V.C SOFT 472/NAT.0000</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>100</ASSEMBLY_QUANTITY>
> <BULK_DENSITY>44949</BULK_DENSITY>
> <PPG>JHY0992</PPG>
> <HUMIDITY__PERMITTED>0.998</HUMIDITY__PERMITTED>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Unreleased</JOB_STATUS>
> <COMPONENTS/>
> <OPERATIONS/>
> </ROW>
> <ROW num="4">
> <JOB_NUMBER>6</JOB_NUMBER>
> <JOB_TYPE>STANDARD</JOB_TYPE>
> <ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>2</ASSEMBLY_QUANTITY>
> <BULK_DENSITY>122</BULK_DENSITY>
> <PPG>AS33</PPG>
> <HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Released</JOB_STATUS>
> <LOT_NUMBER>6</LOT_NUMBER>
> <COMPONENTS>
> <COMPONENTS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>GILADI-510
> CHALK</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.24</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>DOP
> DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.644</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>EDENOL
> D-82,HENKEL</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.032</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
> E2400L</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.01</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
> 2WH1061</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.02</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>SOLVIN 270PF
> SOLVAY</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>1.004</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/29/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> </COMPONENTS>
> <OPERATIONS>
> <OPERATIONS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>ELEC04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>7.518797</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>SETUP04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>40</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PROD04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>23.809524</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>NONPROD04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>COLORMAT04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PREMIX04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> </OPERATIONS>
> </ROW>
> <ROW num="5">
> <JOB_NUMBER>7</JOB_NUMBER>
> <JOB_TYPE>STANDARD</JOB_TYPE>
> <ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>1</ASSEMBLY_QUANTITY>
> <BULK_DENSITY>122</BULK_DENSITY>
> <PPG>AS33</PPG>
> <HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Complete</JOB_STATUS>
> <LOT_NUMBER>7</LOT_NUMBER>
> <COMPONENTS>
> <COMPONENTS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>12CCCUZ00090</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>GILADI-510
> CHALK</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.12</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>13PLAPY00010</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>DOP
> DI-OCTYL-PHTHALATE</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.322</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>14STBEY00170</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>EDENOL
> D-82,HENKEL</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.016</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>15LUBEY00240</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>LOXIOL G40, ADVALUB
> E2400L</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.005</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>17WITZ100030</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>TIO2,2220(CL220)KRONOS
> 2WH1061</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.01</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>11PVCNZ0004B</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>SOLVIN 270PF
> SOLVAY</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.502</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> <COMPONENTS_ROW num="7">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <DEPARTMENT>PVC</DEPARTMENT>
> <COMPONENT_ITEM>14STBLX00034</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>AKROPAN 2143GX
> AKDENIZ</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>0.025536</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> </COMPONENTS>
> <OPERATIONS>
> <OPERATIONS_ROW num="1">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>ELEC04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>7.518797</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="2">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>SETUP04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>40</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="3">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PROD04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>23.809524</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="4">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>NONPROD04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>0</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="5">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>COLORMAT04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> <OPERATIONS_ROW num="6">
> <OPERATION_SEQ_NUM>10</OPERATION_SEQ_NUM>
> <RESOURCE_CODE>PREMIX04</RESOURCE_CODE>
> <REQUIRED_PRODUCTION>52.631579</REQUIRED_PRODUCTION>
> </OPERATIONS_ROW>
> </OPERATIONS>
> </ROW>
> <ROW num="6">
> <JOB_NUMBER>9</JOB_NUMBER>
> <JOB_TYPE>PACKING</JOB_TYPE>
> <ASSEMBLY_NUMBER>3E1120102390</ASSEMBLY_NUMBER>
> <ASSEMBLY_DESCRIPTION>W&C E-112/WHITE-1239</ASSEMBLY_DESCRIPTION>
> <ASSEMBLY_QUANTITY>1</ASSEMBLY_QUANTITY>
> <CUSTOMER_NUMBER>? ' '?</CUSTOMER_NUMBER>
> <PACK_TYPE>PE BAG WITHOUT LOGO</PACK_TYPE>
> <PACK_CODE>PBR</PACK_CODE>
> <PALLET_SIZE_TYPE>TELMA PALLET HOLIS</PALLET_SIZE_TYPE>
> <MARKED_PACK>REGULAR STANDARD LABEL</MARKED_PACK>
> <BULK_DENSITY>122</BULK_DENSITY>
> <PPG>AS33</PPG>
> <HUMIDITY__PERMITTED>0.09787</HUMIDITY__PERMITTED>
> <ITEM_PRIMARY_UOM_CODE>KG</ITEM_PRIMARY_UOM_CODE>
> <JOB_STATUS>Complete</JOB_STATUS>
> <LOT_NUMBER>010508001</LOT_NUMBER>
> <COMPONENTS>
> <COMPONENTS_ROW num="1">
> <OPERATION_SEQ_NUM>1</OPERATION_SEQ_NUM>
> <COMPONENT_ITEM>3E1120102390</COMPONENT_ITEM>
> <COMPONENT_DESCRIPTION>W&C
> E-112/WHITE-1239</COMPONENT_DESCRIPTION>
> <COMPONENT_QUANTITY>1</COMPONENT_QUANTITY>
> <REQUIRED_DATE>11/30/2005 0:0:0</REQUIRED_DATE>
> </COMPONENTS_ROW>
> </COMPONENTS>
> <OPERATIONS/>
> </ROW>
> </ROWSET>|||Dear Hilary
i need to write a Mapping Scehma.
which i do not know to to do.
can you please help me.
i allredy write a source in vb.net that read the XML and The XSD and insert
into SQL
all i need is the right schema according to the XML below
thanks.
"Hilary Cotter" wrote:
> Here is what I do.
> Read this into a data set and then write it out using the WriteXMLSchema
> method.
> Here is a brief example in c#.
> DataSet ds = new DataSet("MyXML");
> ds.ReadXml("C:\\c53a1602ff3011d48d140004ac5e3ab0.xml");
> ds.WriteXmlSchema("C:\\MyXML.xsd");
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "sqlxml problem Please help"
> <sqlxmlproblemPleasehelp@.discussions.microsoft.com> wrote in message
> news:3B1097A3-88B2-432F-8CA9-FACB0C063997@.microsoft.com...|||I normally do this as part of a manual process. I create stored procedures
to fire the xml data into the respective tables.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"sqlxml problem Please help"
<sqlxmlproblemPleasehelp@.discussions.microsoft.com> wrote in message
news:1D7DBF7A-E015-448C-883C-72839C357484@.microsoft.com...
> Dear Hilary
> i need to write a Mapping Scehma.
> which i do not know to to do.
> can you please help me.
> i allredy write a source in vb.net that read the XML and The XSD and
> insert
> into SQL
> all i need is the right schema according to the XML below
> thanks.
> "Hilary Cotter" wrote:
>|||You can also open the Xml file in the Xml editor (in VS 2005) and click on
the create schema icon.
To get the mapping information check-out the SQLXML help.
Thanks,
Avner Aharoni[MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Hilary Cotter" wrote:
> I normally do this as part of a manual process. I create stored procedures
> to fire the xml data into the respective tables.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "sqlxml problem Please help"
> <sqlxmlproblemPleasehelp@.discussions.microsoft.com> wrote in message
> news:1D7DBF7A-E015-448C-883C-72839C357484@.microsoft.com...