Questions tagged [ibm-db2]

This tag is to discuss the queries on IBM DB2 software. The users of the DB2 product can post their queries here.

25 questions
2
votes
1 answer

How to get row update count in a DB2 update query in node.js?

I am trying to execute an update statement in node.js on DB2 database. The update operation works but I don't know how to get the count of updated records in DB2 after query execution. Any help will be appreciated. Below is my…
saurabhg07
  • 23
  • 3
2
votes
1 answer

select subset of column in IBM DB2

I am not being able to perform select query on a subset of columns of a database in IBM DB2. select * from user This works. But select username from user doesn't work. Here's the screenshot.
nishantsingh
  • 4,537
  • 5
  • 25
  • 51
2
votes
1 answer

Query XML by SQL

I have an XML column: ACHER DOA The sug can hold only a enum memeber(ACHER or DOA). I would like to check if there is a sug…
user3165438
  • 2,631
  • 7
  • 34
  • 54
1
vote
1 answer

How to catch an error generated by db2_fetch_assoc() if the query is successful?

I'm using DB2 for IBM i (an iSeries (AS/400)) using PHP 5.6.5, ibm_db2 driver on Zend Server 8.0.2. I've run into an instance where a view which contains sub-selects which are aliased to a name may or may not return multiple rows. I did not create…
d.lanza38
  • 2,525
  • 7
  • 30
  • 52
1
vote
0 answers

How to add 1 nano second to a timestamp

How to add 1 nano second to a timestamp. I am doing this - select CURRENT_TIMESTAMP + '0000-00-00 00:00:01' FROM SYSIBM.SYSDUMMY1 but it does not help me. Can anyone please help me in this ?
Govind
  • 71
  • 1
  • 11
1
vote
0 answers

ZendServer ibm_db2.so stopped to load

I use Linux and I installed ZendServer for developement. I setted up everything and it worked until yesterday. Out of nothing I got this error and I can't fix it. [12-Mar-2015 16:24:53 Africa/Blantyre] PHP Warning: PHP Startup: Unable to load…
0
votes
1 answer

db2 query returning 0 records

I am trying to execute below query: select * from trgdms.src_stm where trim(src_stm_code) in (select concat (concat('''', trim(replace(processed_src_sys_cd,',',''','''))),'''' ) from trgdms.batch_run_log where src_stm_cd_or_hub_cd='CTR' and…
dna
  • 483
  • 3
  • 10
  • 32
0
votes
1 answer

Authentication Using Passport js

everybody I am working on an application which is using IBM db2 as database and using passport js for authentication purpose. so my question is how do i compare the values which are coming from login form to that which are stored in…
user2881430
  • 367
  • 1
  • 5
  • 17
0
votes
1 answer

db2_connect() returns resource ID despite failing

I'm running on an AS/400 V7R2 using the ibm_db2 driver from a PHP script. I noticed if I pass an invalid library list to db2_connect() with the i5_libl option with the rest of the connection string being valid, it will still return a resource ID…
d.lanza38
  • 2,525
  • 7
  • 30
  • 52
0
votes
0 answers

UNNEST function in DB2 is throwing an error

I'm working on DB2 database and using TOAD to execute the below statement. STRINGARRAY is already created in MYSCHEMA as Arraytype. BEGIN DECLARE CASE_ID_LIST MYSCHEMA.STRINGARRAY; SET CASE_ID_LIST = ARRAY['A001','A002','A003','A004']; SELECT…
Aravind
  • 462
  • 1
  • 7
  • 22
0
votes
0 answers

DB2 on delete trigger causing deadlock

When trying to run a delete query on the parent table I am getting locked. Following is the table structure and executing this " DELETE FROM PARENT WHERE PARENT_ID = 1; " would create a deadlock - ------------------Create related…
johncorner06
  • 97
  • 1
  • 7
0
votes
1 answer

DB : perform an update query after a fetch one inside a transaction

I am working on an IBM DB, but I think the concepts are pretty much the same. I want to fetch a single line, return these data (or save them into variables let's say) and update some fields of that specific row. There might be a number of instance…
ghostrider
  • 5,131
  • 14
  • 72
  • 120
0
votes
1 answer

SQL Dwell Calculation excluding time periods

I'm currently trying to recreate a manual report which creates an "Aging" column for and Activity but excludes non-working hours from the calculation. Is this possible to create, and how would I go about it in T-SQL (SSMS 2014 or using and odbc…
Caitlin W
  • 1
  • 1
0
votes
1 answer

Doctrine 2 - IBM DB2

I have problem while mapping DB2 Table with Doctrine 2. Application exists for a long time and for strange reason there was a "£" special char added in front of some columns names. Ex : £ADRB1 While checking documentation, it appreared that this is…
Benjamin Ghenne
  • 91
  • 1
  • 1
  • 10
0
votes
1 answer

IBM-DB2 installtion failed on xampp1.7.1 on linux system

I am trying to install ibm-db2 driver on my lampp server, but I am getting this error: root# /opt/lampp/bin/pecl install ibm_db2 No releases available for package "pecl.php.net/ibm_db2" Cannot initialize 'channel://pecl.php.net/ibm_db2', invalid or…
1
2