Jump to content

Sql Lookup And Concat Help Plz


Recommended Posts

Posted

Bhayas,
source lookup table structure etla undhi:

sou_value c1 c2 c3 c4
A x 1 h1 null

B y 2 h2 null

C z null h3 null

D null 4 h4 null

F_doc ane column by lookup chesi D1, D2, D3, D4 Columns lo naku value populate cheyali, adhi kuda concat ga like below


F_DOC D1 D2 D3 D4

A,B,D,C X,Y,NULL,Z 1,2,NULL,Z H1,H2,H3,H4 NULL,NULL,NULL,NULL,

A,B X,Y 1,2 H1,H2 NULL,NULL


Koncham help cheyandi sql expert bhayas,
nenu query rasanu but adhi only one value populate chestadhi, ella induvidual check chesi contact cheyali...

sasthuna oka 2 days nundi


help plz

:3D_Smiles_38: sFun_duh2 *<:(

Posted

anni values anni columns lo ki concat avaala..?
koncham confuse chesav in description...can u please post with clarity

Posted

[quote name='MandhuMarbalaM' timestamp='1380744597' post='1304339676']
anni values anni columns lo ki concat avaala..?
koncham confuse chesav in description...can u please post with clarity
[/quote]

SOURCE LOOKUP TABLE source_value c1 c2 c3 c4 A X H1 1 NULL B Y H2 2 NULL C Z H3 NULL NULL D NULL H4 3 NULL


f_doc ane column already db lo undhi with filled values as shown, kani naku d1, d2, d3, d4 naku values as shown kavali..
ante ee souce value look up chesi c1, c2, c3, c4 values tho concat cheyali..





[center]NEEDED TARGET[/center]
F_DOC
D1
D2
D3
D4
A;B;D;C
X,Y,NULL,Z
H1,H2,H4,H3
1,2,3,NULL
NULL,NULL.NULL,NULL
A,B
X,Y
H1,H2
1,2
NULL,NULL
C
Z
H3
NULL
NULL


hope koncham clear ga chepana?

Posted

etla kastam ardam itale...image thesi aa table strucure veyii

Posted

Clarity clarity Missing Amma inka [img]http://www.gifsoup.com/view2/1133735/chiru-house-enter-o.gif[/img]

Posted

[quote name='GatisKandis' timestamp='1380745822' post='1304339784']
etla kastam ardam itale...image thesi aa table strucure veyii
[/quote]
agreed.
i might not be as adept in technical aspect of this issue...please explain @pithre_

Posted

question adda diddam ga adigi ...help plz....ante etta vaay,,,,konchem ardham ayyetattu post sey

Posted

[quote name='MADHU_PITHRE' timestamp='1380745184' post='1304339726']


SOURCE LOOKUP TABLE source_value c1 c2 c3 c4 A X H1 1 NULL B Y H2 2 NULL C Z H3 NULL NULL D NULL H4 3 NULL


f_doc ane column already db lo undhi with filled values as shown, kani naku d1, d2, d3, d4 naku values as shown kavali..
ante ee souce value look up chesi c1, c2, c3, c4 values tho concat cheyali..





[center]NEEDED TARGET[/center]
F_DOC
D1
D2
D3
D4
A;B;D;C
X,Y,NULL,Z
H1,H2,H4,H3
1,2,3,NULL
NULL,NULL.NULL,NULL
A,B
X,Y
H1,H2
1,2
NULL,NULL
C
Z
H3
NULL
NULL


hope koncham clear ga chepana?
[/quote] nee email id pm cheyyi bhayya..

Posted

@all image upload chesdam ante office la unna...it's not letting me do it ..intiki poyi chestha...

Posted

please post them online with images buddy, im not able to understand

Posted

yes man.. oka paper pai vacchey laa clear ga raasi pic teesi pettu baa.. chosthuntey its easy laagey undi edo miss aithunnav anthey

Posted

select to_char(wm_concat(c1))d1,to_char(wm_concat(c2))d2,to_char(wm_concat(c3))d3,to_char(wm_concat(c4)) d4 from         (  selectrownum,c1,c2,c3,c4 from (select'a' c1, 'x' c2       ,1 c3, 'h1'c4 from dual union all select 'b' c1, 'y' c2       ,2 c3, 'h2' c4 from dual union all select 'c' c1, null c2, null c3, 'h3' c4 from dual union all select 'd' c1, 'z' c2 ,     4 c3, 'h4' c4 from dual ) ) union all select to_char(wm_concat(c1))d1,to_char(wm_concat(c2))d2,to_char(wm_concat(c3))d3,to_char(wm_concat(c4)) d4 from         (  select rownumr,c1,c2,c3,c4 from (select 'a'c1, 'x' c2       ,1 c3, 'h1' c4from dual union all select 'b' c1, 'y' c2       ,2 c3, 'h2' c4 from dual union all select 'c' c1, null c2, null c3, 'h3' c4 from dual union all select 'd' c1, 'z' c2 ,     4 c3, 'h4' c4 from dual ) )where r<= 2 union all select to_char(wm_concat(c1))d1,to_char(wm_concat(c2))d2,to_char(wm_concat(c3))d3,to_char(wm_concat(c4)) d4 from         (  select rownumr,c1,c2,c3,c4 from (select 'a'c1, 'x' c2       ,1 c3, 'h1' c4from dual union all select 'b' c1, 'y' c2       ,2 c3, 'h2' c4 from dual union all select 'c' c1, null c2, null c3, 'h3' c4 from dual union all select 'd' c1, 'z' c2 ,     4 c3, 'h4' c4 from dual ) )where r= 3 

Posted

@thanks MAMAS

ma senior developer gadu etla cheyalo chepadu,...

ikada image post cheyadaniki ravatledhu...


ALSO MEKU TELSINIA MANCHI INSITUTE WHERE PL-SQL TRAINING ISTHARO KONCHAM CHEPANDI....

inko thread estha deni pyi....

again thanks each and every one.

×
×
  • Create New...