|
Home > Archive > ASE Database forum > December 2005 > XML Question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Germano 2005-07-08, 7:24 am |
| I've asked this question in the XML forum, but since I received no replies,
I'm giving it a try here.
Is it possible to load data from an XML file into a table that is structured
the same way?
Kind of like using bcp, but the text file would be an XML file.
Thanks
Germano
| |
| Will Banta 2005-07-08, 9:24 am |
| Germano wrote:
> I've asked this question in the XML forum, but since I received no replies,
> I'm giving it a try here.
>
> Is it possible to load data from an XML file into a table that is structured
> the same way?
>
> Kind of like using bcp, but the text file would be an XML file.
>
> Thanks
>
> Germano
>
>
I've not heard of a way to do this natively, unless you buy XML Services
for ASE. We accomplish basically what you're after in a staging script
by parsing the XML file using Perl's XML::Parser then loading the rows
into an ASE table. I can provide details if you like.
| |
| Rob Verschoor 2005-07-10, 1:23 pm |
| This is the sort of thing you can do in ASE 15.0 (currently in beta; see the
sybase.public.ase15.beta newsgroup), by using computed columns. You can use
this feature to 'automatically' extract elements from an XML doc into
'regular' columns.
HTH,
Rob
-------------------------------------------------------------
Rob Verschoor
Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5 / TeamSybase
Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase Replication Server Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
mailto:rob@YOUR.SPAM.sypron.nl.NOT.FOR.ME
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------
"Germano" <Germano_Silva@Brown.edu> wrote in message
news:42ce6485$1@foru
ms-1-dub...
> I've asked this question in the XML forum, but since I received no
replies,
> I'm giving it a try here.
>
> Is it possible to load data from an XML file into a table that is
structured
> the same way?
>
> Kind of like using bcp, but the text file would be an XML file.
>
> Thanks
>
> Germano
>
>
| |
| Germano 2005-07-11, 9:24 am |
| Here's my situation:
I need to move data fom a Microsoft SQL Server table that basically contains
two columns, an ID column and a comments column that contains lots of text.
In the past, I've used either BCP or event DTS packages fo move data between
this MS SQL Server and the Sybase server, but this text column contains
TABS, CR/LF, COMMAS, you name it, which makes it pretty much impossible to
use BCP and that's why I'm looking at an XML option, since having the text
surrounded by the TAGS shold eiliminate my problem., I hope.
Could you share some of your details?
Thanks
Germano
"Will Banta" < NOSPAMwbanta@deerfie
ldcapital.comNOSPAM> wrote in message
news:42ce8f12@forums
-2-dub...
> Germano wrote:
>
> I've not heard of a way to do this natively, unless you buy XML Services
> for ASE. We accomplish basically what you're after in a staging script by
> parsing the XML file using Perl's XML::Parser then loading the rows into
> an ASE table. I can provide details if you like.
| |
| Rob Verschoor 2005-07-11, 11:24 am |
| What's the problem for using BCP in this case? If it's matter of finding
unique delimiter, just use somehting like '##$$%%@@MYUNIQUESTR
ING' -- small
chance that string will occur in the data...
HTH,
Rob V
"Germano" <Germano_Silva@Brown.edu> wrote in message
news:42d28206$1@foru
ms-2-dub...
> Here's my situation:
>
> I need to move data fom a Microsoft SQL Server table that basically
contains
> two columns, an ID column and a comments column that contains lots of
text.
> In the past, I've used either BCP or event DTS packages fo move data
between
> this MS SQL Server and the Sybase server, but this text column contains
> TABS, CR/LF, COMMAS, you name it, which makes it pretty much impossible to
> use BCP and that's why I'm looking at an XML option, since having the text
> surrounded by the TAGS shold eiliminate my problem., I hope.
>
> Could you share some of your details?
>
> Thanks
> Germano
>
>
> "Will Banta" < NOSPAMwbanta@deerfie
ldcapital.comNOSPAM> wrote in message
> news:42ce8f12@forums
-2-dub...
by[color=darkred]
>
>
| |
| Germano 2005-07-11, 8:24 pm |
| This specific data is coming from an outside vensor and I've asked to get
the data with different delimeters, but it seems to be a problem for them. I
do it all the time in Sybase, but for some reason these people have not been
able to get me that.
"Rob Verschoor" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY> wrote in
message news:42d292ac@forums
-1-dub...
> What's the problem for using BCP in this case? If it's matter of finding
> unique delimiter, just use somehting like '##$$%%@@MYUNIQUESTR
ING' --
> small
> chance that string will occur in the data...
>
> HTH,
>
> Rob V
>
> "Germano" <Germano_Silva@Brown.edu> wrote in message
> news:42d28206$1@foru
ms-2-dub...
> contains
> text.
> between
> by
>
>
| |
| ASE_user 2005-12-16, 3:24 am |
| this help.
"Rob Verschoor" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY> wrote in
message news:42d15476@forums
-2-dub...
> This is the sort of thing you can do in ASE 15.0 (currently in beta; see
> the
> sybase.public.ase15.beta newsgroup), by using computed columns. You can
> use
> this feature to 'automatically' extract elements from an XML doc into
> 'regular' columns.
>
> HTH,
>
> Rob
> -------------------------------------------------------------
> Rob Verschoor
>
> Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
> and Replication Server 12.5 / TeamSybase
>
> Author of Sybase books (order online at www.sypron.nl/shop):
> "Tips, Tricks & Recipes for Sybase ASE"
> "The Complete Sybase Replication Server Quick Reference Guide"
> "The Complete Sybase ASE Quick Reference Guide"
>
> mailto:rob@YOUR.SPAM.sypron.nl.NOT.FOR.ME
> http://www.sypron.nl
> Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
> -------------------------------------------------------------
>
> "Germano" <Germano_Silva@Brown.edu> wrote in message
> news:42ce6485$1@foru
ms-1-dub...
> replies,
> structured
>
>
|
|
|
|
|