Jump to content

sql experts please come


4Vikram

Recommended Posts

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

  • 4Vikram

    21

  • JollyBoy

    10

  • mettastar

    4

  • kittaya

    4

Top Posters In This Topic

4 minutes ago, kittaya said:

function rasi danini call chesuko statement lo ... rayali mari aekkado oka chota thappadhu

will check thanks

1 minute ago, ceelogreen said:

oka table la 47 entries eskoni  aa table ni nee query lo join sesko...

nice thanks 

Link to comment
Share on other sites

select

A.state,

NVL(B.RNK,'SOMEDEFAULT') 

from table A

left join (select distinct state, dense_rank() (order by state) rnk from table) B

on A.STATE=B.STATE

 

 

This works if you are numbering the states in sequential order

Link to comment
Share on other sites

8 minutes ago, mettastar said:

select

A.state,

NVL(B.RNK,'SOMEDEFAULT') 

from table A

left join (select distinct state, dense_rank() (order by state) rnk from table) B

on A.STATE=B.STATE

 

 

This works if you are numbering the states in sequential order

this would be perfect but ipude susna aa table la states names tho paatu inka chaala unai like  numbers and some other values also _%~

Link to comment
Share on other sites

6 minutes ago, kick_seenu said:

select var = ROW_NUMBER() over (partition by AD order by AD) from your table

this works if I have only states man but akada aa table lo inka vere values kuda unai so idhi not working.. paina mettastar vuncle chepindi working

Link to comment
Share on other sites

Just now, 4Vikram said:

this works if I have only states man but akada aa table lo inka vere values kuda unai so idhi not working.. paina mettastar vuncle chepindi working

select only state field

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...