Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

Call to SP in partitioned env. not allowed

Question posted by: PaulR (Guest) on July 30th, 2008 09:45 PM
Hi,
(Infosphere Warehouse v9.5.1)

Encountered a problem migrating a single partition to multi-partition
Database.

Got a SQL error (don't have the exact code but it was something like
SQL2740 reason code 71) when
trying to create a scalar SQL function that has a CALL to a SP. error
message said "this is not allowed
in a partitioned environment".

The call to the SP is only used as a mechanism to eat the SQL
exception when trying to convert a string
that contains non numeric characters to a float, and instead simply
returns Null rather than throwing a SQL
error i.e ignore value (data can be dirty).

An alternative would be to convert(translate) all non numeric chars in
the string first, but this is clumsy as a list of all possible
non numeric characters would be needed.
Another alternative would be to check that the string only contains
numeric characters, but we can't think of a way of doing this that
wouldn't throw an error or incur siginificant overhead checking each
character individually.

any thoughts welcomed...
Serge Rielau's Avatar
Serge Rielau
Guest
n/a Posts
July 31st, 2008
11:15 AM
#2

Re: Call to SP in partitioned env. not allowed
PaulR wrote:
Quote:
Hi,
(Infosphere Warehouse v9.5.1)
>
Encountered a problem migrating a single partition to multi-partition
Database.
>
Got a SQL error (don't have the exact code but it was something like
SQL2740 reason code 71) when
trying to create a scalar SQL function that has a CALL to a SP. error
message said "this is not allowed
in a partitioned environment".
>
The call to the SP is only used as a mechanism to eat the SQL
exception when trying to convert a string
that contains non numeric characters to a float, and instead simply
returns Null rather than throwing a SQL
error i.e ignore value (data can be dirty).
>
An alternative would be to convert(translate) all non numeric chars in
the string first, but this is clumsy as a list of all possible
non numeric characters would be needed.
Another alternative would be to check that the string only contains
numeric characters, but we can't think of a way of doing this that
wouldn't throw an error or incur siginificant overhead checking each
character individually.
>
any thoughts welcomed...

1. Write a Java (or whatever) UDF that does the conversion for you
2. Instead of converting all non-numeric characters convert all numeric
characters fro the test. E.g. if you replace all digits with an empty
string the result should be empty. (Or if you replace all digidt with a
space and trim both sides the result should be empty or a '.'...

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

PaulR's Avatar
PaulR
Guest
n/a Posts
July 31st, 2008
01:45 PM
#3

Re: Call to SP in partitioned env. not allowed
On 31 Jul, 12:08, Serge Rielau <srie...@ca.ibm.comwrote:
Quote:
PaulR wrote:
Quote:
Hi,
(Infosphere Warehouse v9.5.1)

>
Quote:
Encountered a problem migrating a single partition to multi-partition
Database.

>
Quote:
Got a SQL error (don't have the exact code but it was something like
SQL2740 reason code 71) when
trying to create a scalar SQL function that has a CALL to a SP. error
message said "this is not allowed
in a partitioned environment".

>
Quote:
The call to the SP is only used as a mechanism to eat the SQL
exception when trying to convert a string
that contains non numeric characters to a float, and instead simply
returns Null rather than throwing a SQL
error i.e ignore value (data can be dirty).

>
Quote:
An alternative would be to convert(translate) all non numeric chars in
the string first, but this is clumsy as a list of all possible
non numeric characters would be needed.
Another alternative would be to check that the string only contains
numeric characters, but we can't think of a way of doing this that
wouldn't throw an error or incur siginificant overhead checking each
character individually.

>
Quote:
any thoughts welcomed...

>
1. Write a Java (or whatever) UDF that does the conversion for you
2. Instead of converting all non-numeric characters convert all numeric
characters fro the test. E.g. if you replace all digits with an empty
string the result should be empty. (Or if you replace all digidt with a
space and trim both sides the result should be empty or a '.'...
>
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


OK, Thanks.
I was also interested in the wider nature of the restriction ...

Is this restriction likely to remain for partitioned envs.?

PS. SQLCODE - SQL0270.

Serge Rielau's Avatar
Serge Rielau
Guest
n/a Posts
July 31st, 2008
04:25 PM
#4

Re: Call to SP in partitioned env. not allowed
PaulR wrote:
Quote:
Is this restriction likely to remain for partitioned envs.?

For the time being yes. Lifting the restriction is a significant effort
and is not going to happen as an APAR.
So if you need it: Complain - loudly - to your IBM rep.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

 
Not the answer you were looking for? Post your question . . .
189,940 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors