Table 1: TRAN_ADJUSTMENT_REC
Table 2: DLY_TRAN_FILE
I am matching this two tables with this Query
select count(1)
from
TEDCLZ.TRAN_ADJUSTMENT_REC
INNER JOIN
TEDCLZ.DLY_TRAN_FILE
on
cast((REPLACE(substr(cast(date(cast(substr(TEDCLZ.DLY_TRAN_FILE.AT31_TRANSACTION_DATE,5,3) as int))as...
'2006'||SUBSTR(DIGITS(DAYOFYEAR('2006-'||TRAN_DATE_TRANSACTION,1,2||'-'||TRAN_DATE_TRANSACTION,1,2)),8)
this one working fine but i have some days records with year 2005
Here i have to change the format
mm dd to yyyymmm
if date is Feb 3 2006
mm dd show 02 03
yyyymmm show as 2006034
(yyyymmm)2006034 is 2006Jan 31 days + Feb 3 days(31+3=34)
mm dd(02 01) to yyyymmm (2006032)
To change date format i use this in select dtatement
substr(TEDCLZ.CA_AUTH_DLY_FILE.LG3_DATE,5,2) || substr(TEDCLZ.CA_AUTH_DLY_FILE.LG3_DATE,7,2) || substr(TEDCLZ.CA_AUTH_DLY_FILE.LG3_DATE,3,2))
as CHDATE,
but how to use this CHDATE
Note:
format of data in LG3_DATE= 20060120(yyyymmdd)
but in IN_TRANSACTION_DATE= 012006(mmddyy)
Format of LG3_TIME=114921506063
Format of IN_TRANSACTION_AMOUNT=114921
Format of LG3_TRANSACTION_AMOUNT= '+00000000052.19'
Format of IN_TRANSACTION_AMOUNT= '000000052.19'
I have to match two...
I have to match two tables with one columns
but columns are with different data formet
columns 1 having data as +000000150.20 and
columns 2 data as 000150.20
data type of this columns=char
how can i match this two tables
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.