Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

BD Root check: msg#00207

db.maxdb

Subject: BD Root check

Hello!
I have a problem with an insert statement in MaxDB version 7.5.0.19.

The insert is as follow:

INSERT INTO HUMAN_RESOURCE_PROFILE
(
E_HUM_RES_K_HUMAN_RESOURCE,
N_ICON,
N_SIGNATURE,
N_LOGO,
N_CURRICULUM,
N_GENERIC_INFO,
F_AGREEMENT,
K_PROG,
D_START,
O_MODIFY,
E_OPERATOR_K_OPERATOR
) VALUES (
TO_NUMBER('300078'),
null,
null,
null,
null,
null,
'T',
(select NVL(MAX(K_PROG)+1,1) FROM HUMAN_RESOURCE_PROFILE WHERE
E_HUM_RES_K_HUMAN_RESOURCE=300078),
TRUNC(SYSDATE),
SYSDATE,
'guest'
)

I receive the message using jdbc connection:

4960003 - 22/11/2004 13:02:40 003 - error - SqlMgr - PoolThread-9 -
executeBatchList: exception [-602]: System error: BD Root check
ANSI-92 SQL State:S0602
Vendor Error code:-602

Using SqlStudio everything goes fine.

Why this difference between Jdbc and SqlStudio?

Deleting the subquery
select NVL(MAX(K_PROG)+1,1) FROM HUMAN_RESOURCE_PROFILE WHERE
E_HUM_RES_K_HUMAN_RESOURCE=300078
resolves the problem.
An option could be to change the insert in the following way:

INSERT INTO HUMAN_RESOURCE_PROFILE
(
E_HUM_RES_K_HUMAN_RESOURCE,
N_ICON,
N_SIGNATURE,
N_LOGO,
N_CURRICULUM,
N_GENERIC_INFO,
F_AGREEMENT,
K_PROG,
D_START,
O_MODIFY,
E_OPERATOR_K_OPERATOR
)
select TO_NUMBER('300078'),
null,
null,
null,
null,
null,
'T',
b.c,
TRUNC(SYSDATE),
SYSDATE,
'guest'
from dual a
cross join
(select NVL(MAX(K_PROG)+1,1) c FROM HUMAN_RESOURCE_PROFILE WHERE
E_HUM_RES_K_HUMAN_RESOURCE=300078) b

But because the field N_CURRICULUM is a long ascii field, I couldn't do that
because you can't act an insert on long field using the insert to....
select.... form.

Have you some hint?

Thanks,
Matteo
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo