db2

published reports don't work - Database logon failed Error

人走茶凉 提交于 2019-12-18 09:53:36
问题 I am developing a simple web app that has 3 reports created on VS 2013, for some reason those reports run fine from developer mode, but when I publish the website they give me "Database logon failed" Error. What could be causing this? VS is installed on the same server that I am publishing the reports. I have created a local admin user with exactly the same info as the ODBC connection logon user for IIS authentication, but still no luck. below is my code: public partial class OpenWOsWebForm :

Emulate REGEXP like behaviour in SQL

穿精又带淫゛_ 提交于 2019-12-18 09:46:31
问题 I've posted this question on the new dba.stackexchange.com (please, let me know if I have to delete one). I'm working on a DB2 database, and as far as I can see regexp is not supported (without additional libraries). So I cannot implement something similar to what is explained in this article "Bringing the Power of Regular Expression Matching to SQL" Do you know if I can "emulate", with a SQL statement, a regular expression like this? ^[aofdmep]\{1\}[a-z]\{1\}[a-z0-9]\{4\}a[sidbfkfpo]\{1\}

Remove Accents DB2

痞子三分冷 提交于 2019-12-18 09:16:35
问题 Does someone knows how to get rid of accents words in DB2 ? I got that one bellow : select UPPER( 'test' || 'DescricaoDomino' || NVL('SiglaDomino', 'X')) from tbProcTeste ; And i got that result : 1 ------------------------------- TESTDESCRICAODOMINOSIGLADOMINO However i could receive a string with accents like this one "!": select UPPER( 'test!' || 'DescricaoDomino' || NVL('SiglaDomino', 'X')) from tbProcTeste ; And id like to get a same result above . Someone knows how do i do that ? Result

Convert DB2 SQL Decimal to DATE

拟墨画扇 提交于 2019-12-18 09:02:26
问题 I need to convert Decimal to date. I have a decimal date field that contains data like this : 1,132,009.00 --1/13/2009 7,152,004.00 --7/15/2004 11,012,005.00 --11/01/2005 etc I would like it to read as xx/xx/xxxx . Is there anyway to do this with SQL commands or DB2 logic in a select statement? SELECT column1 from table1 ; 回答1: WITH x(decvalue) AS ( VALUES (DECIMAL(1132009.00)),(DECIMAL(7152004.00)),(DECIMAL(11012005.00)) ) SELECT CAST( LPAD( RTRIM( CHAR( INTEGER( decvalue/1000000 ))), 2, '0'

Calculating how many days are between two dates in DB2?

泄露秘密 提交于 2019-12-18 07:38:48
问题 I need to get the difference in days between two dates in DB2. I tried a couple of different queries but nothing seems to be working. So basically what i need to get is something like this. SELECT DAYS (CURRENT DATE) - DAYS (DATE(CHDLM)) FROM CHCART00 WHERE CHSTAT = '05'; I know that if I remove CHDLM and specify a date like '2012-02-20' it works but I need to be able to run this against that field in the table. I also try this query that was given to me by a friend by is not working either.

Calculating how many days are between two dates in DB2?

断了今生、忘了曾经 提交于 2019-12-18 07:38:38
问题 I need to get the difference in days between two dates in DB2. I tried a couple of different queries but nothing seems to be working. So basically what i need to get is something like this. SELECT DAYS (CURRENT DATE) - DAYS (DATE(CHDLM)) FROM CHCART00 WHERE CHSTAT = '05'; I know that if I remove CHDLM and specify a date like '2012-02-20' it works but I need to be able to run this against that field in the table. I also try this query that was given to me by a friend by is not working either.

java.lang.UnsatisfiedLinkError while loading DB2 JDBC driver

↘锁芯ラ 提交于 2019-12-18 07:37:50
问题 I try to use jboss-seam with a db2 database, the following error occurs com.ibm.db2.jcc.a.SqlException: [jcc][10389][12245][3.52.95] while loading the native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path an error occurred ERRORCODE=-4472, SQLSTATE=null I tried setting -Djava.library.path=/opt/IBM/db2/V9.5/lib64 as well as -Djava.library.path=/opt/IBM/db2/V9.5/lib32 Both paths include libdb2jcct2.so I also tried to set LD_LIBRARY_PATH with no effect. OS is

java.lang.UnsatisfiedLinkError while loading DB2 JDBC driver

岁酱吖の 提交于 2019-12-18 07:37:09
问题 I try to use jboss-seam with a db2 database, the following error occurs com.ibm.db2.jcc.a.SqlException: [jcc][10389][12245][3.52.95] while loading the native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path an error occurred ERRORCODE=-4472, SQLSTATE=null I tried setting -Djava.library.path=/opt/IBM/db2/V9.5/lib64 as well as -Djava.library.path=/opt/IBM/db2/V9.5/lib32 Both paths include libdb2jcct2.so I also tried to set LD_LIBRARY_PATH with no effect. OS is

Performance of Inner Join vs Cartesian product [duplicate]

有些话、适合烂在心里 提交于 2019-12-18 07:33:18
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Explicit vs implicit SQL joins I want to know the difference in performance of select * from A,B,C where A.x = B.y and B.y = C.z and select * from A INNER JOIN B on A.x = B.y INNER JOIN C on B.y = C.z Basically i want to know if inner join performs better than cartesian product? Also, in inner join is cartesian product carried out internally? 回答1: First of All these two Operations are for Two different purposes

Lob is closed. ERRORCODE=-4470, SQLSTATE=null

拈花ヽ惹草 提交于 2019-12-18 06:08:38
问题 I am using IBM websphere commerce and db2, have following piece of code Clob clobVar = null; if (result.elementAt(3) != null) clobVar = (Clob) result.elementAt(3); if (clobVar == null) { infoTable.put("EInfo", ""); } else { stringTemp = clobVar.getSubString(1, (int) clobVar.length()); infoTable.put("EInfo", stringTemp); } Code works fine till clobVar = (Clob) result.elementAt(3); but as soon as execution comes to stringTemp = clobVar.getSubString(1, (int) clobVar.length()); System throws an