isql

Remove white space from isql output

左心房为你撑大大i 提交于 2021-01-27 19:06:00
问题 Is there any way to stop isql from adding spacing before and after the returned fields? I just want the values from the table row separated by , . At the moment, using -b and -s ',' , I get: ,some_column_entry , 3213, another_column_entry, however, I want: ,some_column_entry,3212,another_column_entry, I read through all the switches, but couldn't seem to find anything appropriate. My wish is to get isql to output in this form rather than parsing the output. EDIT : select top 1 rtrim(ltrim

Sybase ASE isql - Remove blank first column from output into csv file

橙三吉。 提交于 2021-01-07 03:12:43
问题 My question is similar to this post but in their example I want to remove the first delimiter in the output. In the SQL file that's being called, I set nocount on , proc_return_status off , and set proc_output_params off which I figured would remove that column previously inhabited by the x rows affected lines and other statements but now it's just blank. For the isql parameters, I'm just using -s"," and am unsure if I need to add anything else. Desired output: ,some_column_entry,3212 becomes

Sybase ASE isql - Remove blank first column from output into csv file

人走茶凉 提交于 2021-01-07 03:10:50
问题 My question is similar to this post but in their example I want to remove the first delimiter in the output. In the SQL file that's being called, I set nocount on , proc_return_status off , and set proc_output_params off which I figured would remove that column previously inhabited by the x rows affected lines and other statements but now it's just blank. For the isql parameters, I'm just using -s"," and am unsure if I need to add anything else. Desired output: ,some_column_entry,3212 becomes

Sybase ASE isql - Remove blank first column from output into csv file

廉价感情. 提交于 2021-01-07 03:09:42
问题 My question is similar to this post but in their example I want to remove the first delimiter in the output. In the SQL file that's being called, I set nocount on , proc_return_status off , and set proc_output_params off which I figured would remove that column previously inhabited by the x rows affected lines and other statements but now it's just blank. For the isql parameters, I'm just using -s"," and am unsure if I need to add anything else. Desired output: ,some_column_entry,3212 becomes

Informix SQL - List all fields & tables

风流意气都作罢 提交于 2019-12-29 18:34:09
问题 Informix iSQL has a command " info tables; " that shows all tables. The syntax for viewing the fields and their respective data types is " info columns for table; " Is there a similar command that shows table.field for all tables and all fields? 回答1: Using the preferred JOIN notation: SELECT TRIM(t.tabname) || '.' || TRIM(c.colname) AS table_dot_column FROM "informix".systables AS t JOIN "informix".syscolumns AS c ON t.tabid = c.tabid WHERE t.tabtype = 'T' AND t.tabid >= 100 ORDER BY t

Informix 7.3 isql insert statement - text/blob/clob field insert error

早过忘川 提交于 2019-12-18 09:26:58
问题 Is a way around this?? I am trying to insert some data into a table whose structure is: Column name Type Nulls crs_no char(12) no cat char(4) no pr_cat char(1) yes pr_sch char(1) yes abstr text yes The type of the last field reads 'text', but when trying to insert into this table, I get this error: insert into crsabstr_rec values ("COMS110","UG09","Y","Y","CHEESE"); 617: A blob data type must be supplied within this context. Error in line 1 Near character position 66 So this field is some

From a Sybase Database, how I can get table description ( field names and types)?

早过忘川 提交于 2019-12-17 17:28:53
问题 I have access to command line isql and I like to get Meta-Data of all the tables of a given database, possibly in a formatted file. How I can achieve that? Thanks. 回答1: Check sysobjects and syscolumns tables. Here is a diagram of Sybase system tables. List of all user tables: SELECT * FROM sysobjects WHERE type = 'U' You can change 'U' to other objects: C – computed column D – default F – SQLJ function L – log N – partition condition P – Transact-SQL or SQLJ procedure PR – prepare objects

not able to run isql on cygwin

流过昼夜 提交于 2019-12-14 02:08:46
问题 When I am trying to run sybase query through isql syntex it is giving below error. Error - "The context allocation routine failed when it tried to load localization files!! One or more following problems may caused the failure Your sybase home directory is C:\Sybase. Check the environment variable SYBASE if it is not the one you want! Using locale name "en_US.UTF-8" defined in environment variable LANG Locale name "en_US.UTF-8" doesn't exist in your C:\Sybase\locales\locales.dat file An error

isql (sql anywhere) trigger gives error

淺唱寂寞╮ 提交于 2019-12-12 01:52:40
问题 got strange error "Correlation name 'Club' not found" but the table Club is in the DB. I think the problem is after inserting the values: ALTER TRIGGER "tg_add_club" AFTER INSERT, UPDATE ON Club REFERENCING NEW AS item FOR EACH ROW WHEN (item.address NOT IN (SELECT name FROM Place)) BEGIN //DECLARE i_id INTEGER; INSERT INTO Place(name) VALUES (item.address); //SELECT @@identity INTO i_id; UPDATE Club SET place = (SELECT id FROM Place WHERE name=item.address) WHERE Name = item.name; //AND

Firebird database SYSDBA connection error

自闭症网瘾萝莉.ら 提交于 2019-12-11 09:07:04
问题 I just installed Firebird for Win64, and I was trying to connect to the employee database which comes pre-packaged with ISQL. Following the steps from the Firebird official QuickStart Documentation I opened the ISQL utility and entered: connect localhost:employee user sysdba password masterkey; As a result I got: Statement failed, SQLSTATE = 28000 Your user name and password are not defined. Ask your database administrator to set up a Firebird login. Strangest thing is that if I navigate to