for   
Save 
Save 
   Join IIUG  

Informix News
16 October 08 - VendorRate - Informix Earns Top Customer Satisfaction Score on VendorRate in Q3... Read
14 August 08 - IIUG.org - Sellout Expected for the 2009 IIUG Informix Conference... Read
29 April 08 - IntelligentEnterprise.com - IBM Informix Upgrade Enhances Clustering, Database Management... Read
29 April 08 - itweek.com - IBM 'Cheetah 2' mauls data costs... Read
28 April 08 - eWeek.com - IBM Uncages Cheetah 2 Data Server... Read
28 April 08 - CNNMoney.com - IBM Helps Clients Reduce Data Management Costs With New Informix Dynamic Server... Read
09 April 08 - CNNMoney.com - MediaSpan Embeds IBM Informix Dynamic Server Software for Delivering News to Print, Web and Wireless Devices... Read
08 April 08 - IT-Director.com - Informix seeks developers... Read
18 February 08 - marketwire.com - Icarus Studios Partners With IBM to Upgrade Performance, Availability for Its Online Games... Read
17 January 08 - eWeek.com - IBM Adds Mac Support to IDS for Higher Education... Read
17 January 08 - informationweek.com - Lotus Notes For iPhone Signals Closer Ties Between IBM, Apple... Read
16 January 08 - marketwire.com - IBM Informix Dynamic Server to Deliver Support for Mac OS X... Read
16 January 08 - internetnews.com - IBM's IDS to Support Mac Platform... Read
28 June 07 - REG Developer - IBM and Informix tie down Cheetah... Read
27 June 07 - CBRonline.com - IBM corrects its own Informix customer figures... Read
14 June 07 - vnunet.com - IBM changes spots with Informix 'Cheetah' database... Read
14 June 07 - eChannelLine - IBM expands scope for IDS... Read
14 June 07 - Resellernews - IBM: Informix database alive and kicking... Read
13 June 07 - DB2 Magazine - Cheetah is now out of the gate... Read
12 June 07 - IBM - IDS 11 release announcement (pdf)... Read
12 June 07 - ChannelWeb Network - IBM Uncages IDS 11, Aka Cheetah, Database... Read
12 June 07 - eWeek.com - IBM's 'Cheetah' Ready to Pounce... Read
12 June 07 - InformationWeek - IBM Unleashes 'Cheetah' Database... Read
12 June 07 - WebWire - IBM Strengthens Database Portfolio With New Informix Dynamic Server... Read
12 June 07 - Intelligent Enterprise - IBM Unveils Informix Upgrade... Read
12 June 07 - ComputerWeekly.com - IBM's Cheetah IDS makes leap to better data centre clustering... Read
12 June 07 - ebiz - IBM Unveils Next Generation Informix Dynamic Server... Read
12 June 07 - computerworld.com - Will 'Cheetah' help IBM's Informix chase down market share?... Read
12 June 07 - Internetnews.com - No Data Can Outrun This 'Cheetah'... Read
12 June 07 - de.internet.com - IBM neuer Datenbank-Server mit Codenamen Cheetah ist fertig... Read
12 June 07 - verifox.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - golem.de - Informix 11 vorgestellt... Read
12 June 07 - Computerwoche.de - IBM stellt neue Informix-Version vor... Read
12 June 07 - IBM.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - Heise - IBM gibt Informix 11 frei... Read
25 May 07 - Taiwan.CNET.com - Local Taiwan Informix user group established... (Chinese language) ... Read
18 May 07 - ChannelWeb Network - IBM Musters Partners For Cheetah Release... Read
18 May 07 - eWeek.com - IBM Looks to 'Cheetah' to Speed Up Blade Servers... Read
7 May 07 - DB2 Magazine - SQL Shortcuts - Use these tricks to generate IDS SQL scripts... Read

Previous news items
 

Home Member Area About IIUG


Resources
IIUG Insider
IIUG Hotspots
IBM-Informix Links
IIUG RSS Feeds
Software Repository
Informix Products
Online Resources
Informix Library
Informix Books
IIUG Banners
Discussion
Technical Special
  Interest Groups

Other Discussion
Community
Events
Webcasts/Chat w Lab
IIUG TV
IIUG Sponsors
Informix Business Directory
IIUG Press Partners
Local User Groups
Rate the Vendor
Job Board
Fun Stuff

[ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Redbrick List Forum

Re: Conversion of zero to Null in TMU load script?

Posted By:
Date:





Steve,

You're sunk trying to use NULLIF with a separated input file. Since the
NULLIF is position specific, the variable nature of a separated file would
make it's use suspect, so it gets errored out.

What you could do is use a psuedocolumnname for contractor id and then use
a REJECT clause for contractor_ids = 0. YOu could then load the reject
file (of contractor_ids) after awk(ing) or sed(ing) the input file for that
field and remove the 0 entry. Depending on the way the table was created,
it may default to a null so you could just ignore what is coming in from
the reject input file (all zeros) and the column will automatically be
defaulted to null.

Let me know if you have any questions ...

-- Bill

*********************************************************************
William S. Gates IBM
Consulting I/T Specialist 300 Nichols Avenue
Data Management Svcs. Wilmington, DE 19803

Business Intelligence
IBM Red Brick Data Warehouse

Cell: (302) 438-0779 www.ibm.com
Office: (302) 477-1805 gatesw@us.ibm.com
Fax: (302) 477-1806
eFax: (707) 516-7055

*********************************************************************




"Steve Krueger"
<skrueger@baldwinan To: redbrick-list@iiug.org
dlyons.com> cc:
Sent by: Subject: Conversion of zero to Null in TMU load script? [28]
forum.subscriber@ii
ug.org


03/11/2003 01:26 PM






Fellow Red Brick users,
I am looking for a way in my TMU load script to convert fields with a value
of zero to null in the table. I tried using the NULLIF option, but
apparently the NULLIF option cannot be used with a 'SEPARATED format' input
file (TMU fatal error).
Is there another option I can use with a separated format input file?
Below is a sample tmu script (Version 6.11).
Thanks for any ideas or suggestions.

LOAD DATA
INPUTFILE 'e:\rdb1\icprogram_db\inputs\internet_ic_settle.txt'
INSERT
FORMAT SEPARATED BY '|'
DISCARDFILE
'e:\rdb1\icprogram_db\discards\settlement_Úte%_%time%.discard'
ROWMESSAGES
'e:\rdb1\icprogram_db\discards\settlement_Úte%_%time%.messages'
INTO TABLE TEST (
settlementkey INTEGER EXTERNAL(9),
customerkey INTEGER EXTERNAL(9),
terminalkey INTEGER EXTERNAL(9),
contractorkey INTEGER EXTERNAL(9),
il_policykey INTEGER EXTERNAL(9),
name CHAR(30) RTRIM,
state CHAR(10),
monthly_amount DECIMAL EXTERNAL(10,2),
monthly_adjustment DECIMAL EXTERNAL(10,2),
expected_value DECIMAL EXTERNAL(10,2),
insured_value DECIMAL EXTERNAL(10,2),
adjusted_value DECIMAL EXTERNAL(10,2),
pdl_premium DECIMAL EXTERNAL(10,2),
ntl_premium DECIMAL EXTERNAL(10,2),
pd_premium DECIMAL EXTERNAL(10,2),
pd_premium_adjustment DECIMAL EXTERNAL(10,2),
work_accident_premium DECIMAL EXTERNAL(10,2),
work_accident_adjustment DECIMAL EXTERNAL(10,2),
received_date DATE 'YYYYMMDD',
entry_date DATE 'YYYYMMDD',
entry_time TIME 'HHIISSFF',
vehiclekey INTEGER EXTERNAL(9),
contractor_id INTEGER EXTERNAL(8) NULLIF (1:8) = '0',
account_number INTEGER EXTERNAL(4),
settlement_id INTEGER EXTERNAL(8),
adjustment_id INTEGER EXTERNAL(8),
reporting_date DATE 'YYYYMMDD',
ia_policykey INTEGER EXTERNAL(9),
dwh_update_date CURRENT_DATE
);




Messages In This Thread

  • Conversion of zero to Null in TMU load script?
    Steve Krueger -- Tuesday, 11 March 2003, at 1:26 p.m.
    • Re: Conversion of zero to Null in TMU load script?
      William Gates -- Tuesday, 11 March 2003, at 2:10 p.m.
      • Re: Re: Conversion of zero to Null in TMU load script?
        QI JIN -- Tuesday, 11 March 2003, at 5:55 p.m.
      • Re: Conversion of zero to Null in TMU load script?
        John Kelleher -- Wednesday, 12 March 2003, at 7:49 p.m.

[ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

Redbrick List Forum is maintained by Administrator with WebBBS 5.12.

©2001 - 2007 International Informix Users Group.   All rights reserved.     Terms of use    
*** Powered By IBM Informix Dynamic Server V10.00 ***