RE: NEED YOUR OPINION

2002-06-25 Thread Hamid Alavi

Raj,
I want select only those service_code which start with a number(0-9) then
user to_number, replace select all those also start with (a-z).


-Original Message-
Sent: Tuesday, June 25, 2002 9:53 AM
To: Multiple recipients of list ORACLE-L


where
to_number(replace(msc_service_code,'ABCDEFGHIJKLMNOPQRSTUVWXYZqazwsxedcrfvtg
byhnujmikolp')) between 7 and 30 ...

Raj
__
Rajendra Jamadagni  MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

QOTD: Any clod can have facts, but having an opinion is an art!


-Original Message-
Sent: Tuesday, June 25, 2002 12:39 PM
To: Multiple recipients of list ORACLE-L


LYNDA,

If you look at my table staructure service_code in varchar2(30)and the data
in this column can be a number or a number start with a charachter(A-Z)like
A1200,B6500,Z9098 etc,in first subquery I want to select all those
service_code wich start with (0-9) then in WHERE Clause I use TO_NUMBER
becaz I know in subqury It returns all the numeric values:
E.G
select count(*)
>   from (select MSC_SERVICE_CODE,MSC_MTF_SERVICE_ID
> from MTF_SERVICE_CODE_MSC 
>   where 
> substr(MSC_SERVICE_CODE, 1, 1) in  
> ('9','8','7','6','5','4','3','2','1','0')) a  ->>> reurn all service
code start with 0-9
>   where
>to_number(a.MSC_SERVICE_CODE) between 7 and 30
--->> Here a.MSC_SERVICE_CODE convert it to TO_NUMBER  .

Thanks allot





=== Confidentiality Statement === 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
= End Confidentiality Statement =  


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hamid Alavi
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: NEED YOUR OPINION

2002-06-25 Thread Hamid Alavi

Stefan,

If you look at the query in the first part it returns all the numbers then I
use TO_NUMBER, the strange is when I drop the table and recreate it the
query work fine.
Thanks

-Original Message-
Sent: Tuesday, June 25, 2002 2:48 AM
To: Multiple recipients of list ORACLE-L


Hi Hamid

by making sure that the first charakter of msc_service_code is in the range
[0-9], 
you have no guarantee for the rest of the VARCHAR being numeric, too. It
could 
contain anything else, so your to_number might go down the drain ...

Regards,
Stefan


-Ursprüngliche Nachricht-
Von: Hamid Alavi [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 25. Juni 2002 01:23
An: Multiple recipients of list ORACLE-L
Betreff: NEED YOUR OPINION


List,

I have a table with the following structure:

CREATE TABLE SERVICE_CODE_MSC ( 
  MSC_SERVICE_ID  NUMBER (4)NOT NULL, 
  MSC_SERVICE_CODEVARCHAR2 (30)  NOT NULL, 
  CONSTRAINT MSC_PK
  PRIMARY KEY ( MSC_SERVICE_ID, MSC_SERVICE_CODE ) 
USING INDEX 
 TABLESPACE USERS

Here is some sample of this table:
service_id service_code
-  --
7   a1000
7   a2000
30  e1230
30  e1234
10  12098
20  130987


When I run the followinh query on this table I get invalid
number(ORA-01722), then when I drop tha table and reload the data the query
running OK, Here is the query I am running:

select count(*)
from (select MSC_SERVICE_CODE,MSC_MTF_SERVICE_ID
  from MTF_SERVICE_CODE_MSC 
  where 
  substr(MSC_SERVICE_CODE, 1, 1) in
('9','8','7','6','5','4','3','2','1','0')) a
where
 to_number(a.MSC_SERVICE_CODE) between 7 and 30
Any Idea ? why this hapenning?

Thanks Allot.





Hamid Alavi
Office 818 737-0526
Cell818 402-1987






=== Confidentiality Statement === 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
= End Confidentiality Statement =  


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hamid Alavi
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stefan Jahnke
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).





=== Confidentiality Statement === 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
= End Confidentiality Statement =  


--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Hamid Alavi
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list y

RE: NEED YOUR OPINION

2002-06-25 Thread Jamadagni, Rajendra

where
to_number(replace(msc_service_code,'ABCDEFGHIJKLMNOPQRSTUVWXYZqazwsxedcrfvtg
byhnujmikolp')) between 7 and 30 ...

Raj
__
Rajendra Jamadagni  MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

QOTD: Any clod can have facts, but having an opinion is an art!


-Original Message-
Sent: Tuesday, June 25, 2002 12:39 PM
To: Multiple recipients of list ORACLE-L


LYNDA,

If you look at my table staructure service_code in varchar2(30)and the data
in this column can be a number or a number start with a charachter(A-Z)like
A1200,B6500,Z9098 etc,in first subquery I want to select all those
service_code wich start with (0-9) then in WHERE Clause I use TO_NUMBER
becaz I know in subqury It returns all the numeric values:
E.G
select count(*)
>   from (select MSC_SERVICE_CODE,MSC_MTF_SERVICE_ID
> from MTF_SERVICE_CODE_MSC 
>   where 
> substr(MSC_SERVICE_CODE, 1, 1) in  
> ('9','8','7','6','5','4','3','2','1','0')) a  ->>> reurn all service
code start with 0-9
>   where
>to_number(a.MSC_SERVICE_CODE) between 7 and 30
--->> Here a.MSC_SERVICE_CODE convert it to TO_NUMBER  .

Thanks allot



*2

This e-mail message is confidential, intended only for the named recipient(s) above 
and may contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank you.

*2




RE: NEED YOUR OPINION

2002-06-25 Thread Hamid Alavi

LYNDA,

If you look at my table staructure service_code in varchar2(30)and the data
in this column can be a number or a number start with a charachter(A-Z)like
A1200,B6500,Z9098 etc,in first subquery I want to select all those
service_code wich start with (0-9) then in WHERE Clause I use TO_NUMBER
becaz I know in subqury It returns all the numeric values:
E.G
select count(*)
>   from (select MSC_SERVICE_CODE,MSC_MTF_SERVICE_ID
> from MTF_SERVICE_CODE_MSC 
>   where 
> substr(MSC_SERVICE_CODE, 1, 1) in  
> ('9','8','7','6','5','4','3','2','1','0')) a  ->>> reurn all service
code start with 0-9
>   where
>to_number(a.MSC_SERVICE_CODE) between 7 and 30
--->> Here a.MSC_SERVICE_CODE convert it to TO_NUMBER  .

Thanks allot

-Original Message-
Sent: Tuesday, June 25, 2002 2:09 AM
To: Multiple recipients of list ORACLE-L


Hi Hamid,
Can you to give me what you want to obtain as result to this requette.
I believe that in your request you have a problem of conversion of a
varchar2 in number.

LYNDA HAOUHACH
Ingénieur Systèmes
SONATRACH LTH 
Émail: [EMAIL PROTECTED]




> -Message d'origine-
> De:   Hamid Alavi [SMTP:[EMAIL PROTECTED]]
> Date: lundi 24 juin 2002 11:23
> À:Multiple recipients of list ORACLE-L
> Objet:NEED YOUR OPINION
> 
> List,
> 
> I have a table with the following structure:
> 
> CREATE TABLE SERVICE_CODE_MSC ( 
>   MSC_SERVICE_ID  NUMBER (4)NOT NULL, 
>   MSC_SERVICE_CODEVARCHAR2 (30)  NOT NULL, 
>   CONSTRAINT MSC_PK
>   PRIMARY KEY ( MSC_SERVICE_ID, MSC_SERVICE_CODE ) 
> USING INDEX 
>  TABLESPACE USERS
> 
> Here is some sample of this table:
> service_id service_code
> -  --
> 7 a1000
> 7 a2000
> 30e1230
> 30e1234
> 1012098
> 20130987
> 
> 
> When I run the followinh query on this table I get invalid
> number(ORA-01722), then when I drop tha table and reload the data the
> query
> running OK, Here is the query I am running:
> 
> select count(*)
>   from (select MSC_SERVICE_CODE,MSC_MTF_SERVICE_ID
> from MTF_SERVICE_CODE_MSC 
>   where 
> substr(MSC_SERVICE_CODE, 1, 1) in
> ('9','8','7','6','5','4','3','2','1','0')) a
>   where
>to_number(a.MSC_SERVICE_CODE) between 7 and 30
> Any Idea ? why this hapenning?
> 
> Thanks Allot.
> 
> 
> 
> 
> 
> Hamid Alavi
> Office 818 737-0526
> Cell818 402-1987
> 
> 
> 
> 
> 
> 
> === Confidentiality Statement === 
> The information contained in this message and any attachments is 
> intended only for the use of the individual or entity to which it is 
> addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
> and exempt from disclosure under applicable law.  If you have received 
> this message in error, you are prohibited from copying, distributing, or 
> using the information.  Please contact the sender immediately by return 
> e-mail and delete the original message from your system. 
> = End Confidentiality Statement =
> 
> 
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Hamid Alavi
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California-- Public Internet access / Mailing Lists
> 
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: SIM/HAOUHACH
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).





=== Confidentiality Statement === 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, dis

RE: NEED YOUR OPINION

2002-06-25 Thread Mercadante, Thomas F

Hamid,

You WHERE clause is causing the problem.
When you say :
 to_number(a.MSC_SERVICE_CODE) between 7 and 30

you are forcing Oracle to convert the values of the column MSC_SERVICE_CODE
to a number.  Your data shows that the current values contain letters, thus
the "invalid number" error.

Hope this helps.

Tom Mercadante
Oracle Certified Professional


-Original Message-
Sent: Monday, June 24, 2002 7:23 PM
To: Multiple recipients of list ORACLE-L


List,

I have a table with the following structure:

CREATE TABLE SERVICE_CODE_MSC ( 
  MSC_SERVICE_ID  NUMBER (4)NOT NULL, 
  MSC_SERVICE_CODEVARCHAR2 (30)  NOT NULL, 
  CONSTRAINT MSC_PK
  PRIMARY KEY ( MSC_SERVICE_ID, MSC_SERVICE_CODE ) 
USING INDEX 
 TABLESPACE USERS

Here is some sample of this table:
service_id service_code
-  --
7   a1000
7   a2000
30  e1230
30  e1234
10  12098
20  130987


When I run the followinh query on this table I get invalid
number(ORA-01722), then when I drop tha table and reload the data the query
running OK, Here is the query I am running:

select count(*)
from (select MSC_SERVICE_CODE,MSC_MTF_SERVICE_ID
  from MTF_SERVICE_CODE_MSC 
  where 
  substr(MSC_SERVICE_CODE, 1, 1) in
('9','8','7','6','5','4','3','2','1','0')) a
where
 to_number(a.MSC_SERVICE_CODE) between 7 and 30
Any Idea ? why this hapenning?

Thanks Allot.





Hamid Alavi
Office 818 737-0526
Cell818 402-1987






=== Confidentiality Statement === 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
= End Confidentiality Statement =  


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hamid Alavi
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mercadante, Thomas F
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: NEED YOUR OPINION

2002-06-25 Thread SIM/HAOUHACH

Hi Hamid,
Can you to give me what you want to obtain as result to this requette.
I believe that in your request you have a problem of conversion of a
varchar2 in number.

LYNDA HAOUHACH
Ingénieur Systèmes
SONATRACH LTH 
Émail: [EMAIL PROTECTED]




> -Message d'origine-
> De:   Hamid Alavi [SMTP:[EMAIL PROTECTED]]
> Date: lundi 24 juin 2002 11:23
> À:Multiple recipients of list ORACLE-L
> Objet:NEED YOUR OPINION
> 
> List,
> 
> I have a table with the following structure:
> 
> CREATE TABLE SERVICE_CODE_MSC ( 
>   MSC_SERVICE_ID  NUMBER (4)NOT NULL, 
>   MSC_SERVICE_CODEVARCHAR2 (30)  NOT NULL, 
>   CONSTRAINT MSC_PK
>   PRIMARY KEY ( MSC_SERVICE_ID, MSC_SERVICE_CODE ) 
> USING INDEX 
>  TABLESPACE USERS
> 
> Here is some sample of this table:
> service_id service_code
> -  --
> 7 a1000
> 7 a2000
> 30e1230
> 30e1234
> 1012098
> 20130987
> 
> 
> When I run the followinh query on this table I get invalid
> number(ORA-01722), then when I drop tha table and reload the data the
> query
> running OK, Here is the query I am running:
> 
> select count(*)
>   from (select MSC_SERVICE_CODE,MSC_MTF_SERVICE_ID
> from MTF_SERVICE_CODE_MSC 
>   where 
> substr(MSC_SERVICE_CODE, 1, 1) in
> ('9','8','7','6','5','4','3','2','1','0')) a
>   where
>to_number(a.MSC_SERVICE_CODE) between 7 and 30
> Any Idea ? why this hapenning?
> 
> Thanks Allot.
> 
> 
> 
> 
> 
> Hamid Alavi
> Office 818 737-0526
> Cell818 402-1987
> 
> 
> 
> 
> 
> 
> === Confidentiality Statement === 
> The information contained in this message and any attachments is 
> intended only for the use of the individual or entity to which it is 
> addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
> and exempt from disclosure under applicable law.  If you have received 
> this message in error, you are prohibited from copying, distributing, or 
> using the information.  Please contact the sender immediately by return 
> e-mail and delete the original message from your system. 
> = End Confidentiality Statement =
> 
> 
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Hamid Alavi
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California-- Public Internet access / Mailing Lists
> 
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: SIM/HAOUHACH
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: NEED YOUR OPINION

2002-06-24 Thread Rodrigues, Bryan

Hamid,

I believe the problem is in your 'to_number(a.MSC_SERVICE_CODE)' section in
your where clause. This is trying to do a to_number on a field that could
have a non numeric value in the field.

Hope this helps,

Bryan Rodrigues

-Original Message-
Sent: Monday, June 24, 2002 7:23 PM
To: Multiple recipients of list ORACLE-L


List,

I have a table with the following structure:

CREATE TABLE SERVICE_CODE_MSC ( 
  MSC_SERVICE_ID  NUMBER (4)NOT NULL, 
  MSC_SERVICE_CODEVARCHAR2 (30)  NOT NULL, 
  CONSTRAINT MSC_PK
  PRIMARY KEY ( MSC_SERVICE_ID, MSC_SERVICE_CODE ) 
USING INDEX 
 TABLESPACE USERS

Here is some sample of this table:
service_id service_code
-  --
7   a1000
7   a2000
30  e1230
30  e1234
10  12098
20  130987


When I run the followinh query on this table I get invalid
number(ORA-01722), then when I drop tha table and reload the data the query
running OK, Here is the query I am running:

select count(*)
from (select MSC_SERVICE_CODE,MSC_MTF_SERVICE_ID
  from MTF_SERVICE_CODE_MSC 
  where 
  substr(MSC_SERVICE_CODE, 1, 1) in
('9','8','7','6','5','4','3','2','1','0')) a
where
 to_number(a.MSC_SERVICE_CODE) between 7 and 30
Any Idea ? why this hapenning?

Thanks Allot.





Hamid Alavi
Office 818 737-0526
Cell818 402-1987






=== Confidentiality Statement === 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
= End Confidentiality Statement =  


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hamid Alavi
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rodrigues, Bryan
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).