![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have a task to perform that will export data from a single table and create a .csv file. Not a problem I hear - thing is 1 of the columns has HTML code within a product description. However the .csv export requires that this HTML code is stripped. Is it possible to achieve this through DTS? I would rather not do this through an ASP page, as this needs to be run on a scheduled basis. thanks for any advice. Mark |
#3
| |||
| |||
|
|
Can you give us a sample row ? and CREATE TABLE statement ? -- ---------------------------- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Mark Roberts" <mark (AT) freshegg_nospam_ (DOT) co.uk> wrote in message news:e134CSizDHA.3496 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Hi, I have a task to perform that will export data from a single table and create a .csv file. Not a problem I hear - thing is 1 of the columns has HTML code within a product description. However the .csv export requires that this HTML code is stripped. Is it possible to achieve this through DTS? I would rather not do this through an ASP page, as this needs to be run on a scheduled basis. thanks for any advice. Mark |
#4
| |||
| |||
|
|
Hi Allan, Not just us working today then! ![]() CREATE TABLE [products] ( [ProductId] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL , [ProductName] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL , [productShortDescription] [text] COLLATE Latin1_General_CI_AS NULL GO Sample row might be: 1, Alien Chest Burster ,<P>Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller <b>"Alien"</b>. </P Simple example of contents of a couple of the columns to export. Column 3 shows some HTML that we need to clean up and remove the tags. Certain formatting removal is not a problem, but we will be replacing paragraphs and line breaks with the correct ASCII. Mark "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:%230rPWZizDHA.548 (AT) tk2msftngp13 (DOT) phx.gbl... Can you give us a sample row ? and CREATE TABLE statement ? -- ---------------------------- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Mark Roberts" <mark (AT) freshegg_nospam_ (DOT) co.uk> wrote in message news:e134CSizDHA.3496 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Hi, I have a task to perform that will export data from a single table and create a .csv file. Not a problem I hear - thing is 1 of the columns has HTML code within a product description. However the .csv export requires that this HTML code is stripped. Is it possible to achieve this through DTS? I would rather not do this through an ASP page, as this needs to be run on a scheduled basis. thanks for any advice. Mark |
#5
| |||
| |||
|
|
I have just tested this CREATE TABLE [products] ( [ProductId] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL , [ProductName] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL , [productShortDescription] [text] COLLATE Latin1_General_CI_AS NULL) GO INSERT Products(ProductName, ProductShortDescription) VALUES('Alien Chest Burster' ,'<P>Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller <b>"Alien"</b>. </P>') and results are this "ProductId","ProductName","productShortDescription " 1,"Alien Chest Burster","<P>Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller <b>""Alien""</b>. </P>" When I was asked what I wanted the destination text file to look like DTS had added a check to the "Binary" column. I unchecked this Even with binary checked I get "ProductId","ProductName","productShortDescription " 1,"Alien Chest Burster","<P>Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller <b>""Alien""</b>. </P>" Is this not what you want ? -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Mark Roberts" <mark (AT) freshegg_nospam_ (DOT) co.uk> wrote in message news:erh7pvizDHA.1688 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Hi Allan, Not just us working today then! ![]() CREATE TABLE [products] ( [ProductId] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL , [ProductName] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL , [productShortDescription] [text] COLLATE Latin1_General_CI_AS NULL GO Sample row might be: 1, Alien Chest Burster ,<P>Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller <b>"Alien"</b>. </P Simple example of contents of a couple of the columns to export. Column 3 shows some HTML that we need to clean up and remove the tags. Certain formatting removal is not a problem, but we will be replacing paragraphs and line breaks with the correct ASCII. Mark "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:%230rPWZizDHA.548 (AT) tk2msftngp13 (DOT) phx.gbl... Can you give us a sample row ? and CREATE TABLE statement ? -- ---------------------------- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Mark Roberts" <mark (AT) freshegg_nospam_ (DOT) co.uk> wrote in message news:e134CSizDHA.3496 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Hi, I have a task to perform that will export data from a single table and create a .csv file. Not a problem I hear - thing is 1 of the columns has HTML code within a product description. However the .csv export requires that this HTML code is stripped. Is it possible to achieve this through DTS? I would rather not do this through an ASP page, as this needs to be run on a scheduled basis. thanks for any advice. Mark |
#6
| |||
| |||
|
|
Hi Allan, I think I may have been unclear in my previous post - apologies What we are trying to do is remove the HTML code so all HTML formatting is cleaned. The export procedure will run a query on the table, remove the HTML code from 1 of the column data and export the output to a CSV file. Therefore the following in the current table: "ProductId","ProductName","productShortDescription " 1,"Alien Chest Burster","<P>Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller <b>"Alien"</b>. </P>" will get exported to a CSV as: ProductId,ProductName,productShortDescription 1,Alien Chest Burster,Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller Alien(VBCrlf) etc.. Hope this makes more sense. Thanks for your continued help. Mark "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:%23GIfnPvzDHA.556 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I have just tested this CREATE TABLE [products] ( [ProductId] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL , [ProductName] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL , [productShortDescription] [text] COLLATE Latin1_General_CI_AS NULL) GO INSERT Products(ProductName, ProductShortDescription) VALUES('Alien Chest Burster' ,'<P>Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller <b>"Alien"</b>. </P>') and results are this "ProductId","ProductName","productShortDescription " 1,"Alien Chest Burster","<P>Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller <b>""Alien""</b>. </P>" When I was asked what I wanted the destination text file to look like DTS had added a check to the "Binary" column. I unchecked this Even with binary checked I get "ProductId","ProductName","productShortDescription " 1,"Alien Chest Burster","<P>Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller <b>""Alien""</b>. </P>" Is this not what you want ? -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Mark Roberts" <mark (AT) freshegg_nospam_ (DOT) co.uk> wrote in message news:erh7pvizDHA.1688 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Hi Allan, Not just us working today then! ![]() CREATE TABLE [products] ( [ProductId] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL , [ProductName] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL , [productShortDescription] [text] COLLATE Latin1_General_CI_AS NULL GO Sample row might be: 1, Alien Chest Burster ,<P>Few moments in film are as horrifyingly shocking as the moment where the Alien Chest Burster makes its first appearance at the dinner table in the sci-fi thriller <b>"Alien"</b>. </P Simple example of contents of a couple of the columns to export. Column 3 shows some HTML that we need to clean up and remove the tags. Certain formatting removal is not a problem, but we will be replacing paragraphs and line breaks with the correct ASCII. Mark "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:%230rPWZizDHA.548 (AT) tk2msftngp13 (DOT) phx.gbl... Can you give us a sample row ? and CREATE TABLE statement ? -- ---------------------------- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Mark Roberts" <mark (AT) freshegg_nospam_ (DOT) co.uk> wrote in message news:e134CSizDHA.3496 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Hi, I have a task to perform that will export data from a single table and create a .csv file. Not a problem I hear - thing is 1 of the columns has HTML code within a product description. However the .csv export requires that this HTML code is stripped. Is it possible to achieve this through DTS? I would rather not do this through an ASP page, as this needs to be run on a scheduled basis. thanks for any advice. Mark |
#7
| |||
| |||
|
|
Hi Allan, I think I may have been unclear in my previous post - apologies What we are trying to do is remove the HTML code so all HTML formatting is cleaned. The export procedure will run a query on the table, remove the HTML code from 1 of the column data and export the output to a CSV file. |
#8
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |