dbcli / dbcli/mssql-cli

Add a way to run commands from a file

Open
#139 20 comments 29 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
1.4k
Forks
191
PR merge metrics
No merged PRs in 30d

Description

`sqlcmd` provides a [`:r`](https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility#sqlcmd-commands) meta-command to run commands from a file in the current session. `psql` spells it [`\i`](https://www.postgresql.org/docs/current/static/app-psql.html). Does this feature exist in `mssql-cli`? I tried both `:r` and (for the heck of it) `\i` to no avail, though the latter did pop up a tantalizing file browser. 🤔

```
$ mssql-cli -d foo
Version: 0.8.0
Mail: sqlcli@microsoft.com
Home: http://github.com/dbcli/mssql-cli
foo>:r bar.sql
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ':'.
```

![screen shot 2018-01-11 at 9 54 55 am](https://user-images.githubusercontent.com/134455/34831638-7d40b330-f6b5-11e7-9439-b7ed32da4ebd.png)

```
$ mssql-cli -d foo
Version: 0.8.0
Mail: sqlcli@microsoft.com
Home: http://github.com/dbcli/mssql-cli
foo>\i foo.sql
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '\'.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.