using POSITION in a function [message #72197] |
Wed, 09 April 2003 12:17 |
Santosh George
Messages: 27 Registered: June 2002
|
Junior Member |
|
|
My requirement is to concatenate two substrings before loading it into a table. I obtain the substrings using the POSITION notation and concatenate using the CONCAT function. The reason I do not use :field notation is that the subtrings to be concatenated are not table fields.
options (direct=false)
load data
infile 1.dat
APPEND
into table RAW_DATA_FEED_W
(
DHC_CO_C POSITION(01:02),
RISK_SYS_C POSITION(03:05),
ORG_I "CONCAT((POSITION(14:19),POSITION(26:27))"
)
|
|
|
Re: using POSITION in a function [message #72208 is a reply to message #72197] |
Sat, 12 April 2003 04:54 |
|
Barbara Boehmer
Messages: 9102 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
OPTIONS (DIRECT=FALSE)
LOAD DATA
INFILE '1.dat'
APPEND
INTO TABLE raw_data_feed_w
(
dhc_co_c POSITION (01:02),
risk_sys_c POSITION (03:05),
org_i POSITION (14:27) "SUBSTR (:org_i, 1, 6) || SUBSTR (:org_i, 13, 2)"
)
|
|
|