Questions tagged [sqsh]

DESCRIPTION Sqsh (pronounced skwish) is short for SQshelL (pronounced s-q-shell), and is intended as a replacement for the venerable ‘isql’ program supplied by Sybase.

Sqsh (pronounced skwish) is short for SQshelL (pronounced s-q-shell), and is intended as a replacement for the venerable ‘isql’ program supplied by Sybase. It came about due to years of frustration of trying to do real work with a program that was never meant to perform real work. Sqsh is much more than a nice prompt, it is intended to provide much of the functionality provided by a good shell, such as variables, aliasing, redirection, pipes, back-grounding, job control, history, command substitution, and dynamic configuration. Also, as a by-product of the design, it is remarkably easy to extend and add functionality.

29 questions
15
votes
4 answers

What's the equivalent of "Show Tables" in SQSH

How can I get sqsh to tell me which tables are available?
rampion
  • 87,131
  • 49
  • 199
  • 315
12
votes
4 answers

SELECT query on a table with a space in the name using SQSH

I'm using SQSH (version 2.1) on Ubuntu 10.04 to connect to a MSSQL database using a command like this: sqsh -S server -U user -P password -D database I have a table called My Table, but I cannot find a way to run a SELECT query on it. This is what…
jackocnr
  • 17,068
  • 10
  • 54
  • 63
6
votes
4 answers

Unicode in sqsh connecting to MSSQL (or alternatives)

I have a MSSQL database, which contains Unicode (utf8) data. My workstation is linux (currently Ubuntu) and looking for a tool to work with mssql database I found SQSH. The problem is - when I select data in the sqsh console I get jibberish instead…
5
votes
1 answer

how do i pass in a command to sqsh and get the output to a file in one go?

I'm trying to set up a simple loop to periodically query a database table in bash. Normally I seem to have to do: sqsh -s SERV -U user -P passwd -D db -L bcp_colsep=',' then within sqsh I have to type: select * from some_table where foo=bar \go -m…
Palace Chan
  • 8,845
  • 11
  • 41
  • 93
5
votes
1 answer

Execute ms sql server queries from linux terminal

I need to query a MS SQL Server database from a linux terminal. Searching the web and this site I found freetds and then sqsh. I have installed them and seems to connect to the server but I can't get it to execute a query, I'm definitely doing…
Javier Mr
  • 2,130
  • 4
  • 31
  • 39
3
votes
1 answer

Replace isql with sqsh in emacs (Ubuntu)

Using emacs on Ubuntu 11.10. I want to connect to a SQL Server database using sqsh instead of isql. I added the following to my initi.el (set 'sql-sybase-program "sqsh") (set 'sql-ms-program "sqsh") It recompiles and loads successfully. However,…
Choens
  • 1,312
  • 2
  • 14
  • 23
3
votes
3 answers

SQL server integer vs decimal SUM

This is probably a newb question but...I was working on a db in SQSH and it had integer type values that were large (a population attribute). When I wanted to sum these up I got an arithmetic overflow exception. Then I cast the values to Decimal and…
Cemre Mengü
  • 18,062
  • 27
  • 111
  • 169
2
votes
1 answer

SQL Server and sqsh Incorrect syntax near the keyword 'ORDER'

I'm using sqsh to execute a stored procedure: I simplified the procedure like this to be easyer for you to read: CREATE PROCEDURE MyProc AS BEGIN SELECT * FROM Keys WHERE 1=1 ;WITH CTE AS …
ilbonte
  • 151
  • 1
  • 2
  • 10
2
votes
1 answer

sqsh gives "dsp_desc_bind: Memory allocation failure for column #1"

On Ubuntu 18.04 with freetds 1.00.82-2 and sqsh 2.1.7-4build1, I get the following when trying to SELECT foo FROM bar where foo is an nvarchar column: dsp_desc_bind: Memory allocation failure for column #1 Why does this happen? I see some ancient…
unhammer
  • 4,306
  • 2
  • 39
  • 52
2
votes
2 answers

Connecting to Sybase using sqsh

I am new to sybase. I am trying to connect to the database using sqsh. sqsh -Ddatabasename -Hservername -Uusername or sqsh -D databasename -H servername -U username I get the following error. server name not found in configuration file. unknown…
user3525290
  • 1,557
  • 2
  • 20
  • 47
2
votes
2 answers

FREETDS Dateformat issues

Below SQL statement SELECT getdate() go When I run from SQL Server management studio it gives "Jul 27 2016 22:00:00.860" When I run the same from sqsh it gives "Jul 27 2016 10:00PM" sqsh uses freetds to connect to SQL server from my linux box.…
Naga
  • 444
  • 2
  • 7
  • 18
2
votes
3 answers

Getting column names with sqsh -m bcp option enabled?

When I'm using sqsh in interactive mode, sometimes I like to run my query in the following way so I can get it in a nice csv file: 1> select * from Table where Blah=Blah 2> go -m bcp > /file/name/here The only problem I have is that using the…
Matt
  • 21
  • 3
2
votes
3 answers

What is the advantage of using Sqsh with FreeTDS?

newbie question here: I have FreeTDS working and querying a Microsoft SQL server 2008 r2 db, from a mint linux vm, reading the inter-webs, mostly stackoverflow, it is mentioned that I should use sqsh also with FreeTDS, SQSH & FreeTDS, I don't…
user1684462
1
vote
3 answers

SQL Server query result to file

How can I save query result into file from sqsh console? Google is talking about some gui tools I don't want to use. PS: Linux
fl00r
  • 82,987
  • 33
  • 217
  • 237
1
vote
1 answer

I can't make SQSH 2.1.7 with freetds 0.91

I am having trouble building sqsh against freetds. This post cross-references with https://sourceforge.net/projects/sqsh/forums/forum/365924/topic/4716627. I've installed Freetds 0.91 from sunfreeware.com on Solaris 10. I've confirmed the…
caseyboardman
  • 799
  • 2
  • 11
  • 26
1
2