Jump to content

Recommended Posts

Posted
with cte as
(
select colA,colB,row_number() over(partition by colA) as rid
)
update cte set colA = colB where rid = 1;
  • Replies 46
  • Created
  • Last Reply

Top Posters In This Topic

  • kedharinath

    10

  • sanbk

    9

  • mtkr

    8

  • loveindia

    8

Top Posters In This Topic

Posted

2 diff tbls ante join cheyyalevaa two tbls ni?? no comon col a??

ne rotta..em sesavo nekaina ardam aindha..

Posted

Column A        Column B

 

1                          55

1                          45

1                          79

1                          64

1                          89

2                          23

2                          87

3                          45

4                          123

4                          111

4                          65

5                           72

5                          31

5                          18

5                          05

 

Ila unnai bro.. so 1st should be replaced to 55

 

1- 55

2-23

3-45

4-123

 

chepandi bhayya koncham ippudu

 

 

 

with cte as
(
select colA,colB,row_number() over(partition by colA) as rid
)
update cte set colA = colB where rid = 1;

 

gallery_8818_6_385253.gif?1367349476

Posted

ne rotta..em sesavo nekaina ardam aindha..


ardam kaakaponiki emundhii...
nen joins esina... Nuv cte esinavv...
anthe gaa...
Posted


with cte as
(
select colA,colB,row_number() over(partition by colA) as rid
)
update cte set colA = colB where rid = 1;


row num la order by eadii???
Posted

ardam kaakaponiki emundhii...
nen joins esina... Nuv cte esinavv...
anthe gaa...

goti tho poyedhaniki goddali dhaka y ani..gallery_8818_6_385253.gif?1367349476

Posted

row num la order by eadii???

his req is to grab the first record..not the asc or desc of colB..date criteria petkundo or vere attributes tho 10ginchkuntado teldh ga..andhke petle..gallery_8818_6_385253.gif?1367349476

Posted

goti tho poyedhaniki goddali dhaka y ani..gallery_8818_6_385253.gif?1367349476


akkada goddali kuda saripodu anta... cranes neededd...
Posted

his req is to grab the first record..not the asc or desc of colB..date criteria petkundo or vere attributes tho 10ginchkuntado teldh ga..andhke petle..gallery_8818_6_385253.gif?1367349476


assal em pettakapothe 10gichukodaaniki kuda padiki raad gaa
Posted

akkada goddali kuda saripodu anta... cranes neededd...

ekada petkuntadanta cranes..gallery_8818_6_385253.gif?1367349476

Posted

assal em pettakapothe 10gichukodaaniki kuda padiki raad gaa

emi pettanavsram le..req batti change seskovale..gallery_8818_6_385253.gif?1367349476

Posted

emi pettanavsram le..req batti change seskovale..gallery_8818_6_385253.gif?1367349476

 

PM chesa koncham chudu

Posted

row num la order by eadii???

 

sorry reverse lo cheppa... edited....amav26.gif?1368598550

Posted

RowNumber() lo order by is not compulsory man... its just something you can add if you want ordered list of data. amav26.gif?1368598550

 

rownumber in tsql ki order by vundali bro partition by optional .. rownum in oracle sql is a pseudo column..
 

Posted

rownumber in tsql ki order by vundali bro partition by optional .. rownum in oracle sql is a pseudo column..
 

 

partition by anukoni aavesham lo esaaa man post... andukey edit chesaa... india nunchi ee rathri poota work chestuntey vachina sql kuda marchipoyettu unna... amav26.gif?1368598550

×
×
  • Create New...