Jump to content

SQL query help - Oracle syntax


pumpkin

Recommended Posts

  • Replies 34
  • Created
  • Last Reply

Top Posters In This Topic

  • JollyBoy

    10

  • mtkr

    9

  • pumpkin

    8

  • loveindia

    2

Top Posters In This Topic

11 minutes ago, JollyBoy said:

select substr(col,1,NVL(Instr(Col,’.’),len(col))) 

it works except in one scenerio

 

RSAHULIII.D.MODIIII\.7865\.GF for this value i must get as it ease i am getting RSAHULIII

Link to comment
Share on other sites

Just now, pumpkin said:

it works except in one scenerio

 

RSAHULIII.D.MODIIII\.7865\.GF for this value i must get as it ease i am getting RSAHULIII

as it is enduku vastadi..   

"." find cheyagane truncate chestadi rest.. ade kada req 

Link to comment
Share on other sites

1 minute ago, pumpkin said:

it works except in one scenerio

 

RSAHULIII.D.MODIIII\.7865\.GF for this value i must get as it ease i am getting RSAHULIII

first union lo vasthadi gaa idii!!?

Link to comment
Share on other sites

3 minutes ago, JollyBoy said:

as it is enduku vastadi..   

"." find cheyagane truncate chestadi rest.. ade kada req 

only numbers start avute ala truncate kavali if it starts with alpha numeric i need to see the value as it ease

Link to comment
Share on other sites

6 minutes ago, pumpkin said:

only numbers start avute ala truncate kavali if it starts with alpha numeric i need to see the value as it ease

select case when to_number(LEFT(col,1) ) = 1 then substr(col,1,NVL(Instr(Col,’.’),len(col)))   else  col end 

Link to comment
Share on other sites

12 minutes ago, JollyBoy said:

select case when to_number(LEFT(col,1) ) = 1 then substr(col,1,NVL(Instr(Col,’.’),len(col)))   else  col end 

 select case when to_number(substr(name,1) ) = 1 then substr(name,1,NVL(Instr(name,'.'),length(name)))   else  name  end from tt;

thats what i am getting

ORA-01722: invalid number
01722. 00000 -  "invalid number"
*Cause:    
*Action:

Link to comment
Share on other sites

2 minutes ago, pumpkin said:

 select case when to_number(substr(name,1) ) = 1 then substr(name,1,NVL(Instr(name,'.'),length(name)))   else  name  end from tt;

thats what i am getting

ORA-01722: invalid number
01722. 00000 -  "invalid number"
*Cause:    
*Action:

man telidu man.. chuste kani chepalenu.. i am not oracle guy

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...