informix

SQL to find the difference between two rows

倖福魔咒の 提交于 2019-12-09 22:17:11
问题 I have an Informix database containing measured temperature values for quite a few different locations. The measurements are taken every 15 min for all locations and then loaded with a timestamp into the same table. Table looks like this: locId dtg temp aaa 2009-02-25 10:00 15 bbb 2009-02-25 10:00 20 ccc 2009-02-25 10:00 24 aaa 2009-02-25 09:45 13 ccc 2009-02-25 09:45 16 bbb 2009-02-25 09:45 18 ddd 2009-02-25 09:45 12 aaa 2009-02-25 09:30 11 ccc 2009-02-25 09:30 14 bbb 2009-02-25 09:30 15 ddd

Dispose the connection or Close the connection

独自空忆成欢 提交于 2019-12-09 16:45:20
问题 Which one of the following two methods has better performance ? using( var DB_Connection_s = new DBConnection() ) { //todo: interact with database connection } or just : DB_Connection_s.Close(); at the end. Does the first method make the pooling concept useless? Because if I dispose the connection with each use, then I have to open a new connection every time (and there won't be any connections in the pool). 回答1: Connections are released back into the pool when you call Close or Dispose on

informix jdbc stuck connecting

不打扰是莪最后的温柔 提交于 2019-12-09 03:21:27
问题 I'm trying to connect to a Informix database server with jdbc using the standard way : connection = DriverManager.getConnection("jdbc:informix-sqli://"+ip+ /"+sid+":INFORMIXSERVER="+server+";user="+user+";password="+pass+""); But it keeps trying to connect and does not throw a error message (I suppose it tries to connect because it does not show anything). I'm using IBM Informix driver 4.10.00.1534 and Java 1.7. I have been using this method to connect to Informix servers until now, in fact

The same error is detected in stored **procedure**, but not in stored **function**

自闭症网瘾萝莉.ら 提交于 2019-12-08 08:43:41
问题 This question is related to my previous one: RaiseError (PERL, DBI) equivalent for unixODBC C API? As I isolated the problem later, I'll post new question, that is more specific, isolated and without unnecessary information. Version: unixODBC 2.3.0 lib: unixODBC - C API Suppose I have a stored FUNCTION : CREATE FUNCTION "test".func() RETURNING LVARCHAR(1000); set debug file to '/home/directory_does_not_exists/unknown.log'; trace off; trace on; trace off; return 'result is set here'; END

Oracle SQL - Parsing a name string and converting it to first initial & last name

假装没事ソ 提交于 2019-12-08 07:44:54
问题 Does anyone know how to turn this string: "Smith, John R" Into this string: "jsmith" ? I need to lowercase everything with lower() Find where the comma is and track it's integer location value Get the first character after that comma and put it in front of the string Then get the entire last name and stick it after the first initial. Sidenote - instr() function is not compatible with my version Thanks for any help! 回答1: Start by writing your own INSTR function - call it my_instr for example.

How do I get Python and Informix talking on Linux?

╄→гoц情女王★ 提交于 2019-12-08 03:17:03
问题 I have been at this for a while, trying all kinds of different packages from openSource, IBM, and many others. I have not yet found one that works without some sort of confusing install method that I can not get to work, or some sort of integration with other third-party pieces that I can not seem to get working. I am simply trying to perform SQL statements on a Informix Server using Python. No different than mySQL and other tools. Using cursors or full result dumps, really do not care. I

Access informix using C# inside docker container

我怕爱的太早我们不能终老 提交于 2019-12-08 02:15:21
问题 I am working on migrating a NET application that accesses an Informix database so that it can run in a Docker container. I have done a POC and when I run it on my local machine it works correctly. But when I want to run the same application inside a container, an exception is thrown: Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'db2app.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at IBM.Data.DB2.UnsafeNativeMethods.DB232

Remote Informix 11.5 Command Line Client

我只是一个虾纸丫 提交于 2019-12-07 22:51:26
问题 Does a command line tool ship with Informix 11.5 similar to SQLCMD for SQL Server? If yes, how do I connect to a remote server and perform regular SELECT/INSERT/UPDATE queries using it? 回答1: As Michal Niklas says, the standard tool provided with IBM Informix Dynamic Server (colloquially IDS or even just Informix) is DB-Access. However, it is distributed only with IDS itself, not with the Informix Client SDK (CSDK) or Informix Connect (I-Connect) products. If you want to access IDS from a

Informix equivalent to mysql's SHOW CREATE TABLE

蓝咒 提交于 2019-12-07 15:06:54
问题 Is there any equivalent to MySQL's SHOW CREATE TABLE <tablename> in informix? I would like to run it in the SQL Manager on the Server Studio and would also like to obtain information about a tables columns and their types. Is this possible? I've found the systables, syscolumns and information schema, but wasn't lucky with the results I got with the output of select * from... . 回答1: I don't know such SQL command. From command line you can use dbschema utility: C:\Informix>dbschema -t abc -d

Why does this SQL stored procedure require that a temp table be created for it to work (return results)?

我是研究僧i 提交于 2019-12-07 13:54:45
问题 IBM Informix Dynamic Server Version 11.50.FC6 I was working on a small stored procedure that would take name fields from a table and parse them into "user names" with a maximum of 8 chars. This is the code I was trying: CREATE PROCEDURE build_jics_user (pid INT) RETURNING CHAR(8) AS username; SELECT LOWER((SUBSTR(firstname,0,1))||(SUBSTR(lastname,0,7))) username FROM id_rec WHERE id = pid; END PROCEDURE; The error returned when executed is: 659: INTO TEMP table required for SELECT statement.