IBM Developerworks - Informix Developer and User Forum

host name issue with 64 bit Informix Driver on Windows Server 2016

Tue, 11/12/2018 - 16:19

Hi, We have installed Informix Driver v410 FC12 (64bit) on two servers with OS Windows Server 2016, but we are required to use the IP address of the informix server we are trying to connect to instead of it's DNS name in the "current host"  . The driver and configuration works fine on servers with Windows 2008 OS.

Categories: Informix

CASE Statement

Wed, 21/11/2018 - 14:42

I'm trying to add a new column to some code I have, and I am completely stumped.
I was wondering if anyone could assist or point me in the right direction.

Here is what I have:

SELECT CASE WHEN ( cus_nm LIKE '%(%' AND cus_lkp_nm NOT LIKE '%REG%' ) THEN 'N' ELSE 'Y' END AS Main ,* FROM arrcus_rec WHERE cus_dun_no IN ( SELECT cus_dun_no FROM arrcus_rec WHERE cus_usg_sts = 'A' GROUP BY cus_dun_no HAVING COUNT(cus_dun_no) > 1 )

Basically what I want to do is create a new column called Job_Account that is blank if I returned Y in the CASE statement, or if I returned N, displays the cus_num for the record that would have returned Y.
These records will have different customer numbers, but share a cus_dun_no.
So basically if Main is N, show the main customer number (record that would have returned Y).

I was trying to do a cross-apply like in SQL, but it doesn't work.

Any help would be greatly appreciated.

Results would looke like:
 

Main Job Account cus_cus_no   cus_lkp_nm cus_nm
  Y   6625   ABC, INC. ABC, INC. N 6625 6694   ABC (123) ABC, INC.(123)



Thank you in advance!

Categories: Informix