dbTalk Databases Forums  

XML Importing Data into Sybase

comp.databases.sybase comp.databases.sybase


Discuss XML Importing Data into Sybase in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rich
 
Posts: n/a

Default XML Importing Data into Sybase - 06-09-2004 , 09:58 AM






We are in the process or porting over a SQL application into Sybase.

My issue is that the sybase database will be hosted on at a client
site. From time to time we will need to update a few values inside
tables. I was told that we would be able to pass the updates to the
sybase database via xml files sent over ftp.

Is this a true statement and is this they best way to do remote
updates? In the past when using SQL I would ftp over a text file
which had the sql update query string in it. The sql database had a
nightly procedure that checked for the exsistance of this file and ran
query in the file if it appeared.

My only concernat this time is can this be done in Sybase(the FTPing
of updates) and is the prefered format the ftp of a text query or of a
xml file?

Reply With Quote
  #2  
Old   
Mark A. Parsons
 
Posts: n/a

Default Re: XML Importing Data into Sybase - 06-09-2004 , 10:25 AM






Rich wrote:
Quote:
We are in the process or porting over a SQL application into Sybase.

My issue is that the sybase database will be hosted on at a client
site. From time to time we will need to update a few values inside
tables. I was told that we would be able to pass the updates to the
sybase database via xml files sent over ftp.

Is this a true statement and is this they best way to do remote
updates? In the past when using SQL I would ftp over a text file
which had the sql update query string in it. The sql database had a
nightly procedure that checked for the exsistance of this file and ran
query in the file if it appeared.

My only concernat this time is can this be done in Sybase(the FTPing
of updates) and is the prefered format the ftp of a text query or of a
xml file?
Well, I can't answer the xml question but generally speaking ... what you
want to do can be done with Sybase.

Sybase comes with a command line tool called 'isql' which allows you to log
into the dataserver and issue dataserver/database commands as well as SQL
statements. One of the capabilities of isql is the ability to accept a
list of commands from a text file.

In your case you could put your updates into a text file, ftp that text
file to the remote site, have your nightly procedure look for said file,
and if the file exists then feed it to isql. Something like:

--------- mysql.txt ------------
update table1 set col5='new value'
where col1 = 'key'
go
update table2 set col3='another new value'
where col1 = 'another key'
go
----------------------------------

To submit to isql:

isql -U<user_name> -P<password> < mysql.txt > mysql-out.txt

--
Mark A. Parsons

Iron Horse, Inc.
iron_horse (AT) NOSPAM (DOT) compuserve.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.