Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL File

Status
Not open for further replies.

PaulBarbeau

Programmer
Nov 23, 2000
109
CA
I get a script file from a client (.sql extention) that i would like to load into our server via some kinda of automated process. Right now i am loading the file manually however i do not want to do this in the long run. Can anyone give me a hand?

Paul
 
What is the file?
Have a look at

It is a scheduled process that will load any file (with file mask) that turns up in a directory.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Thanks i will look at it. The file is a bunch of SQL commands that they have built as an extract from their database.

Paul
 
that does not work for me as file is not "raw" information rater SQL lines in the file. I guess i need to load the file into a varable then "exec" it or somehow exec the file on the hard drive. The file size is around 3 meg and below is a sample of what is inside it.
Code:
[COLOR=green]INSERT INTO crd_are (crd_id, are_code) VALUES ('673768', 'MNA')
INSERT INTO crd_cnt (crd_id, cnt_code) VALUES ('673768', 'IRN')
INSERT INTO crd_bac (crd_id, bac_code) VALUES ('673768', '016')
INSERT INTO crd_sbs (crd_id, sbs_code) VALUES ('673768', '007')
INSERT INTO crd_sbs (crd_id, sbs_code) VALUES ('673768', '016')
INSERT INTO crd_sbs (crd_id, sbs_code) VALUES ('673768', '036')
[/color]
 
Well i worked it out myself.. i am using osql (isql does not have enought memory to run) and it seams to be loading perfectly

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top