db2-400

DB2 400 drop column

情到浓时终转凉″ 提交于 2019-12-04 10:31:25
问题 I want to drop a column called id which is an auto incrementing PK. The SQL: alter table "CO88GT"."XGLCTL" drop column id cascade; And I get: Error: [SQL0952] Processing of the SQL statement ended. Reason code 10. SQLState: 57014 ErrorCode: -952 I could be wrong but I think it has something to do with preventing the table from losing data. To get around this issue I need to create a new table without the column and copy the data from the old table into the new table and then replace the old

How to view Journal data of a Table Green screen DB2

风流意气都作罢 提交于 2019-12-04 01:42:18
问题 How do you view journal data from a specified table? I want to see what happended to a table in a specified time frame. I got info on the table by using the following command: DSPFD FILE(P6PRDBDB00/P6OIDPF) Got the journaled name and library but I dont know how to view it for the object P6OIDPF? I did go to library #MXJRN and whent to P6 and got the following : How can I view the object P6OIDPF data? Or a command to view it? Theres a lot of objects in P6. 回答1: The command to use is DSPJRN JRN

DB2 400 drop column

半城伤御伤魂 提交于 2019-12-03 05:32:37
I want to drop a column called id which is an auto incrementing PK. The SQL: alter table "CO88GT"."XGLCTL" drop column id cascade; And I get: Error: [SQL0952] Processing of the SQL statement ended. Reason code 10. SQLState: 57014 ErrorCode: -952 I could be wrong but I think it has something to do with preventing the table from losing data. To get around this issue I need to create a new table without the column and copy the data from the old table into the new table and then replace the old table with the new table. davorp Info AS400 is giving you a warning (inquiry message) because of

DB2 query results in Hex format — Need Character/String

隐身守侯 提交于 2019-12-02 18:15:47
问题 I have a query that I can run on a DB2 table using my python SQL tester, and it returns the string values I'm looking for. However, when I run it directly on my database it returns a hex value. Any help in getting the results as a character string would be greatly appreciated! Here is the field definition: ORCTL CCDATA 243 A 14 256 Order Control File Data My query on the iSeries is: select ccdata from ORCTL where ccctlk = 'BUYRAK' 回答1: Using your query, you can cast a string with another

how to connect a bluemix app to on-premise db/as400?

坚强是说给别人听的谎言 提交于 2019-12-02 16:29:04
问题 trying to connect a bluemix app (java liberty profile) to our on-premise db/as400 using a secure gateway. Denying or allowing all connection, doesn't change the error message. It seems that the request from the app doesn't reach the secure gateway client (and I don't see messages on sgw client that mentions the connection refused). How can i resolve that? This the code: DB_SERVERNAME=jdbc:as400://xxx-xx-xxx-x.integration.ibmcloud.com:15XXX/dbname try { Driver driver = new com.ibm.as400.access

Insert a comma in address field before number of house

会有一股神秘感。 提交于 2019-12-02 16:21:05
问题 I have a table with a lot of address field that have no comma between street name and house number. Something like: "VIA MILANO 123" "VIA MILANO A123" "VIA 11 MILANO AA123" What I need is a SQL that insert the comma before the last group that contain numbers... like: "VIA MILANO, 123" "VIA MILANO, A123" "VIA 11 MILANO, AA123" I found something on net but a lot of thinks is not work on IBM DB". Can anybody help me please ? I have more than 100000 recs in the file to solve. Thanks in advance

php_ibm_db2.dll extension for PHP7 on Windows? [closed]

老子叫甜甜 提交于 2019-12-02 13:01:09
问题 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 8 months ago . I'm having a hard time finding a php_ibm_db2.dll extension for PHP7 on Windows. The most recent version on https://pecl.php.net/package/ibm_db2 is from April 2016, so naturally it doesn't work. I've tried downloading a trial of Zend Server 9.1 and using the bundled php_ibm_db2.dll file in a non Zend Server WAMP

DB2 query results in Hex format — Need Character/String

血红的双手。 提交于 2019-12-02 07:36:29
I have a query that I can run on a DB2 table using my python SQL tester, and it returns the string values I'm looking for. However, when I run it directly on my database it returns a hex value. Any help in getting the results as a character string would be greatly appreciated! Here is the field definition: ORCTL CCDATA 243 A 14 256 Order Control File Data My query on the iSeries is: select ccdata from ORCTL where ccctlk = 'BUYRAK' Using your query, you can cast a string with another CCSID, eg : select cast(ccdata as char(14) CCSID 37) from ORCTL where ccctlk = 'BUYRAK' My guess is that it isn

php + unixODBC + DB2 + DESCRIBE = token not valid?

六月ゝ 毕业季﹏ 提交于 2019-12-01 12:21:10
Code I am trying to run: $query = "DESCRIBE TABLE TABLENAME"; $result = odbc_exec($h, $query); The result: PHP Warning: odbc_exec(): SQL error: [unixODBC][IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0104 - Token TABLENAME was not valid. Valid tokens: INTO., SQL state 37000 in SQLExecDirect in ... There were no other problems with SELECT, INSERT, UPDATE or DELETE queries on the same connection. Is this a syntax error? The iSeries flavor of DB2 does not support the SQL DESCRIBE statement. Instead, you have to query the system table: select * from qsys2.columns where table_schema = 'my_schema'

php + unixODBC + DB2 + DESCRIBE = token not valid?

大憨熊 提交于 2019-12-01 09:41:55
问题 Code I am trying to run: $query = "DESCRIBE TABLE TABLENAME"; $result = odbc_exec($h, $query); The result: PHP Warning: odbc_exec(): SQL error: [unixODBC][IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0104 - Token TABLENAME was not valid. Valid tokens: INTO., SQL state 37000 in SQLExecDirect in ... There were no other problems with SELECT, INSERT, UPDATE or DELETE queries on the same connection. Is this a syntax error? 回答1: The iSeries flavor of DB2 does not support the SQL DESCRIBE statement.