DB2 ‘SQL0901 SQL System Error.’ when trying to SELECT from view containing UNION

DB2 ‘SQL0901 SQL System Error.’ when trying to SELECT from view containing UNION

I am using a AS400 DB2 Database. In that Database I got 3 Views.
All Views have the exact same Columnnames and Datatypes.
View 1 & 2 each consist of a Select Statement with aggregate Functions on … Read the rest “DB2 ‘SQL0901 SQL System Error.’ when trying to SELECT from view containing UNION”

Django, Informix, ibm_db and DB2 data server driver

Django, Informix, ibm_db and DB2 data server driver

I’m trying to connect to IDS(v11.50) from django(v1.3.1) using IBM DB2 Data Server Driver (ODBC)(v10.1) and ibm_db (https://code.google.com/p/ibm-db/). Simple query like ‘select distinct adm_audit.action from adm_audit’ from django to driver transfers into select distinct “adm_audit”.”action” from “adm_audit” and generate error:
[IBM][CLI Driver][IDS/UNIX64] … Read the rest “Django, Informix, ibm_db and DB2 data server driver”

How can I create connection to DB2 in RESTXpress?

How can I create connection to DB2 in RESTXpress?

I’m using the RESTXpress engine to create REST services. It works fine with Oracle, but I have an issue with db2 database because db2, besides db2jcc.jar driver, requires license jar file db2jcc_license_c.jar.

Solutions/Answers:

Solution 1:

You can repack all classes in

Read the rest “How can I create connection to DB2 in RESTXpress?”

How to show only 1 row given 1 column has the same value in SQL

How to show only 1 row given 1 column has the same value in SQL

I have a sample output of this right now: Let’s call it table X and attributes x.name, x.title, x.best x.lowest
NAME TITLE BEST LOWEST
——————– ————————- ————— ——-
Andy Aardverk Avarice is Good CARP 215.95… Read the rest “How to show only 1 row given 1 column has the same value in SQL”

PHP Zend_Db_Statement_DB2 returns null for static field

PHP Zend_Db_Statement_DB2 returns null for static field

I am building my SQL statement through a PHP API, and then passing it through a module that connects to our database (DB2).
My issue: a static field (sales_type) is returning null when passing the SQL through a Zend_Db_Statement_DB2 module. Running the SQL … Read the rest “PHP Zend_Db_Statement_DB2 returns null for static field”