• DB2/iSeries clean up

    I'm trying to find and clean up line breaks, carriage returns, tabs and "SUB"-characters in a set of 400k string records but I'm having a ton of trouble with my DB2 environment.After doing some searching, and I thought replacing with the "REPLACE()" and "CHR()" functions could work, but it's not...

    ITKE345,065 pointsBadges:
  • Having difficultly making my DB2 queries case sensitive

    I'm been having a lot of problems making my DB2 (AS/400) queries case sensitive. Here's an example of what I'm trying to do: SELECT * FROM NameTable WHERE LastName = 'smith' That returns zero results but this returns 1000's or results: SELECT * FROM NameTable WHERE LastName = 'Smith' Does anyone...

    ITKE345,065 pointsBadges:
  • Looking to add a column to DB2/400 table

    I'm a beginner with AS/400 and I'm wondering if there's an SQL command on AS/400 to add a column to a table in a specific ordinal position (or moving an existing column to a different position)? Pointing me in the right direction would be great. Thanks!

    ITKE345,065 pointsBadges:
  • Can I select the identity value from an insert statement?

    Our company is using iSeries for DB2/AS400 and we're hoping someone can help us with this simple question. Would there be a way to return the identity value from an insert statement without using two lines of SQL? We're currently being forced to use inline SQL in C# to perform an insert. Basically,...

    ITKE345,065 pointsBadges:
  • Trying to call a DB2 stored procedure in IBM System i Access

    I'm trying to test a DB2 stored procedure that's running on an AS/400 system. Our company currently has the IBM System i Access for Windows installed that runs SQL commands against the DB2 database. My big question: What is the syntax to execute a stored procedure that takes in a parameter /...

    ITKE345,065 pointsBadges:
  • I need help creating a delimitted string in DB2

    Over the past few days, I've been trying to create a delimited string from the results of a query in DB2 on iSeries. I was able to do it in T-SQL but am struggling here.Here's the code I used in T-SQL. I'm basically looking for the equivalent in DB2.DECLARE @a VARCHAR(1000) SELECT @a = COALESCE(@a...

    ITKE345,065 pointsBadges:
  • CASE keyword statement in DB2 for IBM iSeries

    I've been recently writing queries for DB2 on an IBM iSeries box. I know about the "CASE" keyword, but it's not working for me. I keep receiving this error message: Keyword CASE not expected. Here's one of my sample code: IF EXISTS ( SELECT * FROM MYTABLE WHERE KEY = xxx ) THEN UPDATE MYTABLE SET...

    ITKE345,065 pointsBadges:
  • Debugging stored procedures for DB2

    Is there a tool for IBM DB2 similar to PL/SQL Developer where I can develop a debug stored procedures?

    ITKE345,065 pointsBadges:
  • Cleaning up code in DB2

    I have a major project wherein I have to clean up some 500k string records in a DB2 environment. This entails removing line breaks, tabs, stray code, etc. Unfortunately, I'm not as familiar with DB2 as I thought. I tried to use REPLACE() and CHR() functions, but CHR() does not work: (Error: CHR in...

    ITKE345,065 pointsBadges:
  • AS/400 and DB2: Pagination query

    I'm currently working on a project in which I'm trying to create PHP web-based paging for our tables that have over a million rows. I've figured out that I have three options:Retrieve all rows in resultset (Not possible due to the size)Retrieve 1,000 rows, put in temporary table and create an...

    ITKE345,065 pointsBadges:
  • RPG programming: Are nulls not permitted?

    I know this might be an off-topic discussion but I was recently told by one of our RPG programmers that none of our AS/400-based DB2 database tables can permit nulls because "they're really difficult to program" for in RPG. Is this true? If so, what makes the basic database feature so difficult in...

    ITKE345,065 pointsBadges:
  • Receiving error message in DB2/400 drop column

    I'm looking to drop a column, known as "id", which would auto incrementing PK. Here's the SQL:alter table "CO88GT"."XGLCTL" drop column id cascade;And I've been this error:Error: [SQL0952] Processing of the SQL statement ended. Reason code 10. SQLState: 57014 ErrorCode: -952I'm not sure but it...

    ITKE345,065 pointsBadges:
  • Security/ Audit Check list for DB2

    Hi, I'm in the process of hardening the DB2 in Linux and I'm looking for a checklist to help me make sure I don't miss anypoint. Since I'm not an expert on DB2 I would like to have a starting point. I'm looking to make sure I don't leave open doors and also I want ot make sure I don't get an Audit...

    Josec990 pointsBadges:
  • Top N query using DB2

    I need to perform a Select top N * from as400table query against an AS/400 using DB2. Any thoughts?

    ITKE345,065 pointsBadges:
  • How do you do LIMIT in DB2 for iSeries?

    We currently have a table of more than 50,000 records and we're trying to return records of 0 to 10,000 / records of 10,000 to 20,000. We already know that in SQL, if you write "LIMIT 0,10000" at the end of the query, it will bring you that record. How can you do it in DB2 for iSeries? Thanks!

    ITKE345,065 pointsBadges:
  • How do I update rows in DB2?

    How do I update rows in DB2. When I used SQL, I was able to go forward with this: update top (100) table1 set field1 = 1 This doesn't work in DB2. Any suggestions on what I should do instead?

    ITKE345,065 pointsBadges:
  • How to use Timestamp related keywords in DB2 IDDA box

    Hi, I have a Fetch query where I need to get the current timestamp for a particular column. I'm getting -904 error code: due to the usage of 'current timestamp'  keyword in IDDA box accelerator. Is there are any work around for this.

    Rajeshmuthukumar10 pointsBadges:
  • Can you run Entitiy framework with a DB2 iSeries AS/400?

    We're looking to upgrade to Entity framework to work with our DB2 iSeries AS/400. The DB2 iSeries AS/400 is not a new technology. Does anyone know of any problems we should look for in the upgrade or later performance; and whether this configuration will work at all.

    ITKE345,065 pointsBadges:
  • Syspunch with Default value to a column in Load JCL

    Hi, Consider having a unload and load jcl. while loading into the table I like to have a default value for a particular column. Eg. for Column CREATE_TIMESTAMP. I like to have current timestamp to be loaded to the column. current timestamp or timestamp when the load JCL is executing. Can this be...

    Rajeshmuthukumar10 pointsBadges:
  • DB2 reorgchk current statistics on table all

    With help of below query we are getting output for all tables and indexes  "db2 reorgchk current statistics on table all". But I want only those tables which we can reorg on that tables like *---*,--** etc..... Please provide me SQL query where I can see only that tables name where they require...

    tusharhande85 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following