🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.database
Article #388

Re: JBuilders SQL Builder, using functions?!?!?!?

#388
From: Arthur Ore
Date: Wed, 21 Feb 2007 20:20
48 lines
2539 bytes
Hi,
I've just experimented with this. I got JB 2006 Ent, the same as Nick. I 
used classes12.jar against a 10G Oracle database.

The following SQL (which should work on virtually any Oracle database) runs 
happily in PL/SQL :-
select * from dual where dummy in (select dummy from dual)

The same statement also works fine in JB 2006's Database Pilot.

If you create a new datamodule and use the SQL builder to create the 
following SQL statement it works.
SELECT * FROM DUAL

Once you've created your QueryDataSet, go into design mode and select your 
QueryDataSet from the structure pane.
From the properties window, click on the 3 ellipses next to the Query 
property.
Now type in the original SQL with the nested subquery :-
select * from dual where dummy in (select dummy from dual)

Click the test query button and you should get "SUCCESS".

Now click the SQL Builder button and use the same SQL in the builder, this 
time you get an error parsing SQL. I think this probably suggests a problem 
with the builder rather than JDBC.

I think the moral is that as John says he avoids using the SQL Builder to 
construct the SQL. You could test it in the Database Pilot and paste it in 
from there.

Hope this helps.
Arth






"Nick" <nmperez@water.ca.gov> wrote in message 
news:45dc7fd2$1@newsgroups.borland.com...
>
>
> I appreciate everyones help on this topic. Will do on the JDBC book, I am 
> crash course learning JBuilder, so I appreciate the explanations.
>
> thanks again,
> Nick 
Technical Details
Message-ID: <45dca955@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45d62c8a$1@newsgroups.borland.com> <45db3a0e$1@newsgroups.borland.com> <45db9ecf$1@newsgroups.borland.com> <45dc7fd2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,9a57ca76b54fe400
X-Google-Attributes: gid1073da,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Arthur Ore" <arthur_dot_ore@nospamthx_zen_dot_co.uk>
Newsgroups: borland.public.jbuilder.database
References: <45d62c8a$1@newsgroups.borland.com> <45db3a0e$1@newsgroups.borland.com> <45db9ecf$1@newsgroups.borland.com> <45dc7fd2$1@newsgroups.borland.com>
Subject: Re: JBuilders SQL Builder, using functions?!?!?!?
Date: Wed, 21 Feb 2007 20:20:16 -0000
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
NNTP-Posting-Host: 82.69.65.131
Message-ID: <45dca955@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1172089173 82.69.65.131 (21 Feb 2007 12:19:33 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail