Toad World® Forums

Help with selecting only certain values


#1

Message from: sharvil.desai_218

Hi,

Can someone please tell me how I can select only objects from dba_objects view
whose last character is a number, i.e. 0-9? Thank you.


Historical Messages

Author: sharvil.desai_218
Date: Thu Jul 01 08:17:28 PDT 2010
Hi,

Can someone please tell me how I can select only objects from dba_objects view
whose last character is a number, i.e. 0-9? Thank you.

__



#2

Is this a one-time thingie or a “I’m going to have to do this lots” things…


#3

A combination of the substr() and length() functions will isolate the last
character.


#4

Do you have any experience with regular expressions? That makes your query
pretty straightforward.


#5

Message from: Xx1947xX

Thank you. I have never used them before, but as you have given a good hint I
will try to figure out how to use them.

Regards.


Historical Messages

Author: Xx1947xX
Date: Thu Jul 01 08:41:07 PDT 2010
Thank you. I have never used them before, but as you have given a good hint I
will try to figure out how to use them.

Regards.

__

Author: Jeff Smith
Date: Thu Jul 01 08:17:28 PDT 2010
Do you have any experience with regular expressions? That makes your query
pretty straightforward.
__

Author: sharvil.desai_218
Date: Thu Jul 01 08:17:28 PDT 2010
Message from: sharvil.desai_218 Hi, Can someone please tell me how I can select
only objects from dba_objects view whose last character is a number, i.e. 0-9?
Thank you. _______________________________________ Historical Messages Author:
sharvil.desai_218 Date: Thu Jul 01 08:17:28 PDT 2010 Hi, Can someone please tell
me how I can select only objects from dba_objects view whose last character is a
number, i.e. 0-9? Thank you. __ _______________________________________
__



#6

Here’s an example to show off the Knowledge Xperts

http://www.toadworld.com/KNOWLEDGE/KnowledgeXpertforOracle/tabid/648/TopicID/REGE
XP/Default.aspx


#7

Way cool. Since all but one of our databases is pre-10g, I didn’t know
about this. Need to do some reading, I guess. J

Best regards,
Mike

Michael S. Zarzycki, MTS | Manager of Engineering IT | Sensata Technologies,
Inc. | voice: 508-236-1015 | fax: 508-236-3701 | www.sensata.com | The World
Depends on Sensors and Controls


#8

Thank you. I have never used them before, but as you have given a good hint I will try to figure out how to use them.

Regards.


#9

:slight_smile: Thank you! I got the answer and was able to learn something new too.

This is what I came up with:

SELECT object_name
FROM dba_objects
WHERE REGEXP_LIKE(object_name,’[0-9]$’);

Your help is much appreciated.

Regards.


#10

use this SQL

select object_name from user_objects where
ascii(Substr(object_name,Length(object_name),1)) between 48 and 57;

Thanks and Regards
Rethish


#11

I ran into it last year needing to parse some really complicated strings. I
knew how to do it in Perl, but thought surely oracle had a way too!

Good luck on your upcoming 10/11g migrations J


#12

Hi,

Can someone tell me how to import Project Manager from a 5 beta version to a 5
full version of Toad?

Cheers

Jon Lacey

Important Notice The information in this email is confidential and may be
legally privileged. If you have reason to believe you are not the intended
recipient, any disclosure, copying, distribution or any action taken or omitted
to be taken in reliance on it is prohibited and may be unlawful and you are
requested to contact the sender urgently and dispose of this e-mail. We make
every effort to keep our network free from viruses. You should, however, check
this e-mail, and any attachments to it, for viruses, as we will not be liable
for direct, special, indirect or consequential damages as a result of any virus
being passed on, or arising from alteration of the contents of this message by a
third party. Company registration details, including registered office
information, for Expro’s principal UK companies can be found via the following
link: www.exprogroup.com/UKregisteredoffices


#13

Do you mean Toad for SQL Server?

If so, just open your project file from the beta in the full version.