sqsh

I can't make SQSH 2.1.7 with freetds 0.91

独自空忆成欢 提交于 2020-01-05 12:10:09
问题 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 installation as noted in Chapter 9 of the user guide. Following the sqsh notes from sqsh.org, I've set the SYBASE environment variable to /usr/local/freetds and run the configure script. (I do not have Sybase installed on this machine. I shouldn't need it.)

sqsh SQL Server 2005 execute *.sql file

三世轮回 提交于 2019-12-12 02:42:10
问题 I would to drop remote SQL Server db via sqsh but, I don't know how does it works. I can connect to sql server with command: sqsh -Ulogin -Ppass -Smssql2005 回答1: Once you're connected to the server, you can drop a database with the command drop database [DBName] Assuming that there's no one connected to it, it should work. And if it doesn't, it'll tell you why. 回答2: echo 'USE table' > script.sqsh echo 'go' >> script.sqsh echo 'SELECT * FROM table' >> script.sqsh echo 'go' >> script.sqsh sqsh

Install sqsh for freetds (Sql Server)

我们两清 提交于 2019-12-11 14:53:53
问题 Duplicate: I can't make SQSH 2.1.7 with freetds 0.91 I am trying to install sqsh for freetds (SQL Server) as per this answer. I installed freetds under /opt/freetds . However, I am getting the following error building sqsh: [noahlz:sqsh-2.4]$ sudo ./configure --prefix=/opt/sqsh ... configure: error: Unable to locate Sybase installation. Check your SYBASE environment variable setting. I tried setting export SYBASE=/opt/freetds to no avail. 回答1: On OS X I'd suggest: brew install sqsh Man, I

What options are there for the sqsh style “csv” (or anyway to get tab-delimited out)

泪湿孤枕 提交于 2019-12-11 04:57:25
问题 With the DB tool sqsh, I want to get the column names and the data tab delimited. The bcp option does not include the column names. The csv option includes the column names, but uses comma as the separate (doh). Is there a way to change it? Currently looking to post-process the file to change the commas to tabs (ignoring the commas within strings...). 回答1: You can \set colsep="\t" to change the separator for the standard output to tab. Edit: \t didn’t work (in my cygwin), so I used <CTRL-V>

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

末鹿安然 提交于 2019-12-10 12:50:37
问题 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 I've tried so far: SELECT * FROM 'My Table' go Output: Incorrect syntax near 'My Table'. (I get the same for double quotes) \set t="My Table" SELECT * FROM $t go Output: Invalid object name 'My'. (Which is weird because if I do \echo $t, I get the