informix

Converting a String to HEX in SQL

扶醉桌前 提交于 2019-12-28 03:05:20
问题 I'm looking for a way to transform a genuine string into it's hexadecimal value in SQL. I'm looking something that is Informix-friendly but I would obviously prefer something database-neutral Here is the select I am using now: SELECT SomeStringColumn from SomeTable Here is the select I would like to use: SELECT hex( SomeStringColumn ) from SomeTable Unfortunately nothing is that simple... Informix gives me that message: Character to numeric conversion error Any idea? 回答1: Can you use Cast and

INFORMIX error on running a Java program [closed]

允我心安 提交于 2019-12-25 18:17:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I have been trying to connect to an Informix database using a small program written in Java. The program is working nicely on one of the Informix test servers but on running in one of the production system it gives us the following exception: java.sql.SQLException: INFORMIXSERVER does not match either

How to rewrite column raw(18) to informix

走远了吗. 提交于 2019-12-25 12:14:49
问题 in my application I have oracle column: COLUMN_NAME RAW(18) not null How should I rewrite it to informix ? I found that similar type is byte but I need also create index on this column which is not allowed on byte (in oracle on raw it is possible) 回答1: I'm supposing are you working with version 12.10 of Informix. This is little weird since at version 11.70 I'm able to use this same command without need to register the datablade. Anyway, try this : execute function SYSBldPrepare('binaryudt.*',

Using an UNLOAD statement in an Informix stored procedure

六月ゝ 毕业季﹏ 提交于 2019-12-25 07:03:43
问题 I'm writing an Informix procedure. I created a temp table, but I want to export this data in a text document. I can't use an UNLOAD statement in SPL; can somebody help me? 回答1: The UNLOAD statement is not recognized by the server. The programs such as DB-Access, ISQL and I4GL recognize it and simulate it as a statement (basically, as a SELECT, of course, reading the data from the server and writing it to a file on the client). Consequently, the statement won't work in SPL — Stored Procedure

Connecting to Informix via DriverManager.getConnection is slow

感情迁移 提交于 2019-12-24 23:24:02
问题 I am using JDBC to connect to an Informix instance via the DriverManager.getConnection method , but I have problems. DriverManager.getConnection takes a long time to establish a connection with Informix. I'm trying to solve this problem, but have not been successful so far. How to solve this problem? 回答1: You can write simple test that shows how long it takes to connect to database. For such things I like Jython that can work with JDBC, which can work with native JDBC drivers and via JDBC

unable to find the requested .net framework data provider. it may not be installed

帅比萌擦擦* 提交于 2019-12-24 17:31:31
问题 I am trying to connect to an informix database on a 64 bit windows 7 pc. I have been able to make the connection just fine on a 32bit pc, but I get the above error when trying to run it on the 64 bit pc. It is looking for the IBM.Data.Informix driver, but says it can't find it. I've got 2 versions of that dll in my GAC - 3.0.0.2 and 9.0.0.2. Does anyone have any idea how to get this working? Thanks for any thoughts. 回答1: I found the issue - I had to edit the machine.config by adding the

unable to find the requested .net framework data provider. it may not be installed

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 17:30:32
问题 I am trying to connect to an informix database on a 64 bit windows 7 pc. I have been able to make the connection just fine on a 32bit pc, but I get the above error when trying to run it on the 64 bit pc. It is looking for the IBM.Data.Informix driver, but says it can't find it. I've got 2 versions of that dll in my GAC - 3.0.0.2 and 9.0.0.2. Does anyone have any idea how to get this working? Thanks for any thoughts. 回答1: I found the issue - I had to edit the machine.config by adding the

How can I suppress filename extensions at the command line interpreter and batch files?

回眸只為那壹抹淺笑 提交于 2019-12-24 15:06:12
问题 Example: I have a file: FILENAME.EXT and would like to extract FILENAME without the .EXT I want to be able to use the extensionless filename for a command which only accepts filenames without its extensions. I have a utility called BCHECK which accepts as its argument a filename with no extensions. Using BCHECK *. does not work because all the files have .DAT or .IDX extensions. These files are constantly being renamed, thus I need to provide BCHECK with the new filenames without having to

Function Add Month in informix

孤人 提交于 2019-12-24 14:12:06
问题 I need a function that adds the current date to 1 month. I do so: let _date = MDY(MONTH(current_date)+1, DAY(current_date), YEAR(current_date)); But there is a problem with the months in which the days <31 回答1: You'll need to check whether it works in your version, but you should get the result you want if you have a sufficiently modern version of Informix (11.70.FC5 or later, or version 12.10.FC1 or later) and you use DATETIME arithmetic. LET next_month = EXTEND(current_date, YEAR TO DAY) +

Variable table or column names

元气小坏坏 提交于 2019-12-24 12:03:01
问题 INFORMIX-SQL or any other SQL-based DB: Suppose I have an app where depending on the value of some columns, example: company.code char(3) {abc} company.branch char(2) {01} Can I construct table name "abc01" for inclusion in SELECT * FROM abc01; ? In other words, a variable table name.. same question applies for column names. 回答1: Only in a language which can manipulate character strings and handle Dynamic SQL. It has to create the statement on the fly. You can only use placeholders in queries