informix

SQL to find the difference between two rows

拜拜、爱过 提交于 2019-12-04 15:07:43
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 2009-02-25 09:30 10 Now I would like a query that present me with the change in temperature between

Which RDBMS and development tool should I choose to re-write my character-based app?

一个人想着一个人 提交于 2019-12-04 10:03:24
I have a pawnshop CRUD app written 20 years ago with INFORMIX-SQL/SE (DOS) which is currently running on DOS 6.22 within Microsoft Virtual PC 2007 on Windows Vista. I would like to modernize this app with a GUI, SQL-based engine and retain its existing functionality. It doesn't require any networking or multi-user capability. I would prefer a product which is royalty-free. I also would like to quickly re-write it with as little effort possible. Which tool would you recommend? I'm debating whether to re-write my INFORMIX-SQL app with I4GL (character-based) or another Windows/GUI-based tool. My

SSIS BIML generates SQL code with brackets

谁说我不能喝 提交于 2019-12-04 04:17:51
问题 Im using BIML to dynamically create load packages for SSIS to load data from Informix to SQL Server. The problem is that this BIML code produces the SQL below <DirectInput>SELECT <#=table.GetColumnList()#> FROM <#=table.GetTag("SourceSchemaQualifiedName")#></DirectInput> SELECT [column1], [column2], [column3], FROM [mySchema].[mySrcTable] But that doesnt work in my source database because of the brackets. Any way i can get the columnlist & tablename without the brackets dynamically? 回答1: You

PHP and Informix on Debian - how to install/configure the PDO

泪湿孤枕 提交于 2019-12-03 07:42:14
问题 This question seems to be asked quite a bit and the answer seems to change with time. I've spent the weekend getting the IBM Client SDK for Informix working on Debian (because most directions on the process are lacking, so this took a weekend to sort out.) I can connect and run queries to a remote Informix server with isql now - no problem. Now I need PHP to connect so that I can render output to apache. This syntax; <?php try { $dbh = new PDO("informix:DSN=InformixDB", "username", "password"

testing inequality with columns that can be null

梦想的初衷 提交于 2019-12-03 06:35:44
So, I asked a question this morning, which I did not phrase correctly, so I got a lot of responses as to why NULL compared to anything will give NULL/FALSE. My actual question was, what is the time honored fashion in which db guys test inequalities for two columns that can both be NULL. My question is the exact opposite of this question . The requirements are as follows, A and B are two columns: a) if A and B are both NULL, they are equal, return FALSE b) if A and B are both not NULL, then return A<>B c) if either A or B are NULL, they are not equal, return TRUE Depending on the data type and

PHP and Informix on Debian - how to install/configure the PDO

一个人想着一个人 提交于 2019-12-02 21:11:00
This question seems to be asked quite a bit and the answer seems to change with time. I've spent the weekend getting the IBM Client SDK for Informix working on Debian (because most directions on the process are lacking, so this took a weekend to sort out.) I can connect and run queries to a remote Informix server with isql now - no problem. Now I need PHP to connect so that I can render output to apache. This syntax; <?php try { $dbh = new PDO("informix:DSN=InformixDB", "username", "password"); } catch (PDOException $e) { echo $e->getMessage(); } ?> Produces a "could not find driver" error on

How to create a huge Informix database?

陌路散爱 提交于 2019-12-02 16:53:20
问题 Can anyone provide me with a script for creating a huge database (for example, 2 GB of data) in IBM Informix Dynamic Server (IDS) version 11.50.FC4 on a Linux RHEL 64-bit machine? 回答1: I have a 2TB+ (nrows=10M, rowsize=2048) ascii load file (with pipe delimiters) for Informix which has unique: fullnames, adresses, phone numbers and a variety of other data types, like DATE, SMALLINT, DECIMAL (9,2), etc. for testing/benchmarking purposes. Problem is - how can I get it to you? Writing a script

Informix SQL / insert result of stored procedure in table

試著忘記壹切 提交于 2019-12-02 16:08:06
问题 kassa_akt_revizii_parser('','','') returns field(per_monets_5,per_monets_10,per_monets_25,per_monets_50,per_rub_1,per_rub_5,per_rub_10,per_rub_25,per_rub_50,per_rub_100,per_rub_200,per_rub_500,per_val_376,per_val_428,per_val_498,per_val_643,per_val_840,per_val_978,per_val_980) We need to do an insert into a table: insert into kassa_akt_revizii_pereschet( id_akt_revizii,per_monets_5,per_monets_10,per_monets_25,per_monets_50, per_rub_1, per_rub_5, per_rub_10, per_rub_25, per_rub_50, per_rub_100

Fetch a fixed number of rows in SQL query in Oracle [duplicate]

≡放荡痞女 提交于 2019-12-02 14:33:14
问题 This question already has answers here : Paging with Oracle (5 answers) Closed 5 years ago . Please help me to write an SQL query in the Oracle database. There is table called tbl and it has 12 rows. I want to select first 4 rows first then next 4 and the last 4 rows. Can any anyone tell me how can I do this in Informix. 回答1: You can use rownum : select * from (select t.*, rownum rn from tbl t) where rn between 1 and 4; / select * from (select t.*, rownum rn from tbl t) where rn between 5 and

Tracing ODBC calls for Informix Client for Linux

痞子三分冷 提交于 2019-12-02 13:25:03
问题 I tried to trace ODBC function calls from my program working on Linux. This program dynamically links ODBC manager and then connect to database and fetch some data. I can trace ODBC calls with unixODBC by adding to odbcinst.ini: [ODBC] Trace=yes TraceFile=/tmp/sql.log This method is documented by IBM: Collecting data for an ODBC Problem But when I change manager from unixODBC to Informix's own manager (libifdmr.so), the trace file is not created. Anybody successfully obtained ODBC trace from