× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
If you want to make sure that the separator is . (apacgrtest.prod_wragt)
rather than / (apacgrtest/prod_wragt) you can use the
getCatalogSeparator method of the Connection class


-----Original Message-----
From: Weining Xu [mailto:xu_weining@yahoo.com]
Sent: vendredi, 7. juin 2002 14:20
To: java400-l@midrange.com
Subject: RE: DB2 SQL problem -- Urgent help needed


Still does not work.

My actual SQL is:

update apacgrtest.prod_wragt  set
apacgrtest.prod_wragt.agt_id = (select
apacgrtest.agent.agt_id from apacgrtest.agent where
apacgrtest.prod_wragt.co_code =
apacgrtest.agent.co_code and
apacgrtest.prod_wragt.agt_no =
apacgrtest.agent.agt_no)

and I still got:

SQL0104 - Token . was not valid. Valid tokens: =.

--- Marcin Jekot <marcin_jekot@yahoo.com> wrote:
> Can the problem of naming not be sorted out by:
>   Connection conn;
>   //conn = .... here
>   String sep =
> conn.getMetaData().getCatalogSeparator();
>   //in the SQL string use:
>   "lib" + sep + "table"
>
> I think that the problem Wayne is having is not
> caused by the "."
> separator. I was having a similar problem on V4R5.
> Wayne, can you try
> modify the statement to:
>
> update mydb.table1 set mydb.table1.name = (select
> mydb.table2.name
> from mydb.table2 where mydb.table1.id =
> mydb.table2.id);
>
> and see what happens. If this above works for Wayne,
> can somebody
> explain it?
>
> Thanks
> -Marcin Jekot
>
>
> > From: "Price, Chris" <chris_price@nsb.co.uk>
> > To: "'java400-l@midrange.com'"
> <java400-l@midrange.com>
> > Subject: RE: DB2 SQL problem  -- Urgent help
> needed
> > Date: Thu, 6 Jun 2002 14:46:52 +0100
> > Reply-To: java400-l@midrange.com
> >
> > That's what I'm thinking may be the problem.
> >
> > I'm not sure where the iSeries stores the default
> value for this.
> >
> > The safest thing to do is set the "naming"
> property to "sql" in the
> > JDBC
> > driver url in your application.
> >
> > Chris.
> >
>
> > > >  -----Original Message-----
> > > > From:   Weining Xu
> [mailto:xu_weining@yahoo.com]
> > > > Sent:   06 June 2002 14:07
> > > > To:     java400-l@midrange.com
> > > > Subject:        DB2 SQL problem  -- Urgent help
> needed
> > > >
> > > > Hi all,
> > > >
> > > > We developed an Java program on AS400 V5R1
> machine
> > > > by
> > > > using native DB2 JDBC driver.  Then we deploy
> the
> > > > program on an AS400 V4R5 machine, also using
> > > native
> > > > DB2 JDBC driver.  Both matchines use JDK1.2.2.
> > > Some
> > > > SQL statements are not working on the
> depolyment
> > > > AS400. An example is update record with
> subselect.
> > > > A
> > > > simplfied SQL is:
> > > >
> > > > update mydb.table1 t1 set t1.name = (select
> > > t2.name
> > > > from mydb.table2 t2 where t1.id = t2.id);
> > > >
> > > > I got:
> > > > [SQL0104] Token . was not valid. Valid tokens:
> =.
> > > >
> > > > The exactly same SQL works fine on V5R1
> machine.
> > > So
> > > > it should not be the problem of SQL. It seems
> like
> > > > the
> > > > V4R5 does not accept subselect SQL syntax,
> since
> > > all
> > > > simple select, insert, update and delect are
> > > working
> > > > fine.
> > > >
> > > > What could be wrong?  Does we missing any
> PTFs?
> > > >
> > > > Wayne (Weining) Xu
> > > >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> _______________________________________________
> This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L) mailing list
> To post a message email: JAVA400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/cgi-bin/listinfo/java400-l
> or email: JAVA400-L-request@midrange.com
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l.
>


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.


**********************************************************************
This E-mail and any files transmitted with it are confidential
and intended for the exclusive use of the addressee(s) only.
 You should not disclose its contents to any other person.
If you are not the intended recipient please notify the sender
immediately.
**********************************************************************


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.