User Profile

Collapse

Profile Sidebar

Collapse
FritzLeblanc
FritzLeblanc
Last Activity: Aug 31 '07, 12:18 PM
Joined: Jul 27 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • FritzLeblanc
    replied to Syntax to Update Timestamp Column
    in DB2
    Shouldn't be any different from any other column type. Update table_name set timestamp_colum n = current timestamp. if you use a host variable instead of current timestamp, you need to make sure that the host variable contains a properly formatted timestamp value....
    See more | Go to post

    Leave a comment:


  • FritzLeblanc
    replied to Definition of empty table
    in DB2
    I'm not sure you can insert a row into that table. By definition, it always returns a single row....
    See more | Go to post

    Leave a comment:


  • FritzLeblanc
    replied to DB2 Merge performance
    in DB2
    I'm not sure you've provided enough information. The answer may depend on how many rows are in the insert and updates tables. If they're small relative to the base table, then I'd go with option 1. Probably the best thing you can do is to test both options and choose the option that performs best in your environment.

    Fritz...
    See more | Go to post

    Leave a comment:


  • Assuming that you're missing some rows based on a non-match in the key columns, the following statement should provide the desired results.
    SELECT tp.COUNTRY, tp.KIND,count(t p.patent_key) as "COUNT OF BASICS" FROM PATENT AS tp, left outer join TRACKER AS tr on tp.PATENT_KEY=t r.PATENT_KEY where (tr.KEY in (SELECT key from TRACKER_DICT where STATE_NAME='Cre ate New Patent Record')) AND (tr.ARRIVED >='2004-06-22-00.00.00.000000 ' and...
    See more | Go to post

    Leave a comment:


  • FritzLeblanc
    replied to Mainframe file loaded into DB2 table
    in DB2
    First question I'd have to ask is what platform. IBM provides a load utility on the mainframe. I'm sure there are similar functions on the other platforms. The manuals should be able to provide specifics and examples....
    See more | Go to post

    Leave a comment:


  • FritzLeblanc
    replied to How to Handle IF THEN ELSE IN DB2
    in DB2
    I think you need to be a bit more explicit in your request. What exactly are you trying to do? Without knowing more, all I can suggest is that you investigate the use of the CASE statement.

    Fritz...
    See more | Go to post

    Leave a comment:


  • FritzLeblanc
    replied to Insert using RRN?
    in DB2
    The short answer is no. There is no implicit order to rows selected from a DB2 table. You can determine the order in which rows are returned either by an ORDER BY or GROUP BY clause. If you don't care what order your rows are returned in, then you could start your view with a select column_names from SYSIBM.SYSDUMMY 1 and connect it to your existing view with a UNION ALL. If your results do need to be returned in a predetermined order, then you...
    See more | Go to post

    Leave a comment:


  • FritzLeblanc
    replied to Db2
    in DB2
    The unit of work is normally rolled back if it ends abnormally.
    See more | Go to post

    Leave a comment:


  • FritzLeblanc
    replied to displaying a date
    in DB2
    The problem is that MAX(ACTION_TS) is meaningless. Null doesn not have any meaning so tit can never be max or min, or greateer than, etc.

    You might try the following:
    SELECT CASE COALESCE(ACTION _TS,'0000-00-00-00.00.00.000000 ' FROM AUDIT , CARD WHERE ROW_ID = CARD_ACCT_SHORT _NO
    See more | Go to post

    Leave a comment:


  • FritzLeblanc
    replied to Delete rows from two tables
    in DB2
    You could also use referential integrity specifying cascade delete.
    See more | Go to post

    Leave a comment:


  • FritzLeblanc
    replied to Insert v/s Load
    in DB2
    I think the answer depends a bit on how large the million rows insert activity compares to the number of rows in the table already. If it's a relatively small percentage, and you have adequate freespace, the nthe inserts should perform acceptably. Be careful to commit on a regular basis, though.
    It might also depend on whether the rows would normally be spread throughout the table or added at the end. A load utility would add the rows at...
    See more | Go to post

    Leave a comment:


  • FritzLeblanc
    started a topic DB2 INSERT search for space
    in DB2

    DB2 INSERT search for space

    I'm looking for documentation that describes how DB2 searches for freespace in a segmented tablespace when inserting a new row. Can anyone point me to such a document, or can anyone describe how DB2 does this?
    See more | Go to post
No activity results to display
Show More
Working...