473,327 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

java.sql.SQLException: General error

INSERT INTO ECN_1 (Old_SbPartNo, Old_PartDesc, Old_ManPartNo,
Old_Manuf, Old_Vendor, Old_RefDesi, Old_Qty,
New_SbPartNo, New_PartDesc, New_ManPartNo,New_Manuf, New_Vendor,
New_RefDesi, New_Qty)
select SB0014.SbPartNo, SB0014.partDesc, SB0014.mANpARTnO,
SB0014.manufacturer,
SB0014.vendor, sb0014.refdesi, sb0014.qty,
SB0014_2.SbPartNo, SB0014_2.partDesc, SB0014_2.mANpARTnO,
SB0014_2.manufacturer, SB0014_2.vendor,
sb0014_2.refdesi, sb0014_2.qty
from SB0014 LEFT OUTER JOIN SB0014_2
on SB0014.SBPARTNO = SB0014_2.SBPARTNO
where sb0014_2.SbPartNo is null
or sb0014.partDesc <> sb0014_2.partdesc
or sb0014.manpartno <> sb0014_2.manpartno
or sb0014.manufacturer <> sb0014_2.manufacturer
or sb0014.vendor <> sb0014_2.vendor
or sb0014.refdesi <> sb0014_2.refdesi
or sb0014.qty <> sb0014_2.qty
union all
select null, null, null, null, null, null,null,
sb0014_2.SbPartNo, SB0014_2.partDesc, SB0014_2.mANpARTnO,
SB0014_2.manufacturer,
SB0014_2.vendor, sb0014_2.refdesi, sb0014_2.qty
from sb0014
right outer join sb0014_2 on sb0014.SbPartNo = sb0014_2.SbPartNo
where sb0014.SbPartNo is null

It don't thro' error if i don't include last seven lines of the query.
If i include the part of query, it throws SQLException as below.

java.sql.SQLException: General error

What's wrong in the above query? Pls help.

Nov 13 '05 #1
1 7599
ralamo wrote:
INSERT INTO ECN_1 (Old_SbPartNo, Old_PartDesc, Old_ManPartNo,
Old_Manuf, Old_Vendor, Old_RefDesi, Old_Qty,
New_SbPartNo, New_PartDesc, New_ManPartNo,New_Manuf, New_Vendor,
New_RefDesi, New_Qty)
select SB0014.SbPartNo, SB0014.partDesc, SB0014.mANpARTnO,
SB0014.manufacturer,
SB0014.vendor, sb0014.refdesi, sb0014.qty,
SB0014_2.SbPartNo, SB0014_2.partDesc, SB0014_2.mANpARTnO,
SB0014_2.manufacturer, SB0014_2.vendor,
sb0014_2.refdesi, sb0014_2.qty
from SB0014 LEFT OUTER JOIN SB0014_2
on SB0014.SBPARTNO = SB0014_2.SBPARTNO
where sb0014_2.SbPartNo is null
or sb0014.partDesc <> sb0014_2.partdesc
or sb0014.manpartno <> sb0014_2.manpartno
or sb0014.manufacturer <> sb0014_2.manufacturer
or sb0014.vendor <> sb0014_2.vendor
or sb0014.refdesi <> sb0014_2.refdesi
or sb0014.qty <> sb0014_2.qty
union all
select null, null, null, null, null, null,null,
sb0014_2.SbPartNo, SB0014_2.partDesc, SB0014_2.mANpARTnO,
SB0014_2.manufacturer,
SB0014_2.vendor, sb0014_2.refdesi, sb0014_2.qty
from sb0014
right outer join sb0014_2 on sb0014.SbPartNo = sb0014_2.SbPartNo
where sb0014.SbPartNo is null

It don't thro' error if i don't include last seven lines of the query.
If i include the part of query, it throws SQLException as below.

java.sql.SQLException: General error

What's wrong in the above query? Pls help.

There may be more than one error but the one that jumps out at me is
that you have two distinct queries here - an INSERT into ECN_1 and a
SELECT from the sb* tables.

I assume you are using Jet and the JDBC-ODBC bridge (if not you are in
the wrong newsgroup. Well, some folks would still say you are in the
wrong newsgroup...)

Sun always warns that the JDBC-ODBC code is not production quality which
means its not fully debugged and has limited functionality. You can
create simple reliable production apps with it but finding reliable info
and support is difficult even with Google.

--
'---------------
'John Mishefske
'---------------
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jan Gregor | last post by:
Hello I found that jython catches exact java exceptions, not their subclasses. Is there some way to get around this limitation (or error) ? My program has class representing database source...
3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
6
by: Rhino | last post by:
I'm trying to debug a simple Java UDF written in the DB2General style within Eclipse. I'm getting a java.lang.UnsatisfiedLinkError when I execute the set() method in the UDF. I know that the...
2
by: technocrat | last post by:
HOW CAN THIS BE DONE IN JAVA??? THIS IS POSITIONED UPDATE EXEC SQL DECLARE C1 CURSOR FOR SELECT * FROM EMPLOYEE FOR UPDATE OF JOB; EXEC SQL OPEN C1;
2
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: ...
8
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive...
2
by: dmstn | last post by:
Hey! I've got a little problem. I have to make a web site for a university essay. I curently have to create a search engine. Users can enter a hotel name in a search bar and results have to appear in...
2
by: khalidanwar123 | last post by:
i am getting the following error while updating a clob field. ERROR java.sql.SQLException: Data size bigger than max size forthis type: 4003 19:28:27,499 ERROR at...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.