Skip to Content
0
Former Member
Feb 25, 2011 at 03:52 PM

get Counter for my target field

38 Views

Hello,

Can you please let me know how to assign counter to my target filed...

i have my target JDBC structure as given below:

Test_db_mt

--statement1 (HEADER)

-


tablename

-


action

-


table

-


access

-


mat_ID (filed1)

-


country (filed2)

--statement2 (DATA)

-


tablename

-


action

-


table

-


access

-


mat_ID (filed1)

-


subID (filed2)

-


location

--statement3 (DATA2)

-


tablename

-


action

-


table

-


access

-


mat_ID (filed1)

-


subID (filed2)

-


design

So my output should be

HEADER

<mat_ID> <country>

1.................. IN

2.................. AP

3.................. EU

DATA1

<mat_ID> <subID> <location>

1............... 1.................. aaa

1............... 2................. bbb

1............... 3................. ccc

2............... 4................. eee

2............... 5................. fff

2............... 6................. ggg

3............... 7................. hhh

3............... 8................. kkk

DATA2

<mat_ID> <subID> <design>

1............... 1................. aa

1............... 2................. bb

2............... 3................. cc

2............... 4................. dd

3............... 5................. ee

3............... 6................. ff

HOW TO GET THE count of HEADER to DATA1 and DATA2?

i tried all the ways with default counter/index...but i am not able to achieve the above logic....So only option seems UDF code...i tried few udf codes available in SDN...but no success...

So could you please provide the exact UDF code for my above requirement...(appriciate if you provide complete UDF code.)

Edited by: SARAN on Feb 25, 2011 5:13 PM