O.O
O.O

Reputation: 11317

How to run a SQL script in Intersystems Cache?

I have a script in a file (mysqlscript.sql) that is basically a bunch of inserts/updates/deletes separated by GO statements

insert into ....
GO
update .....
GO

How do I run this script?

Upvotes: 0

Views: 875

Answers (2)

Andreas
Andreas

Reputation: 16

The tool Caché Monitor use GO as statement separator and connects to InterSystems Caché. With this tool you can execute your script.

Upvotes: 0

DAiMor
DAiMor

Reputation: 3205

You can try to use $system.SQL.ImportDir()
And of course, you can read your file and execute each sql-query in your programm.

Upvotes: 1

Related Questions