🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#385
From: Nick
Date: Tue, 20 Feb 2007 18:12
22 lines
2420 bytes
Just an update...
I tried using different JDBC drivers and had no luck in using subqueries with QueryDataSet in JBuilder 2006.  I had to rewrite the Subqueries as Joins instead and this seems to work. I am still not sure if it truelly is a JDBC driver issue or a JBuilder issue.  I was unable to find any information regarding my particular problem (running subqueries, 3 levels, wouldn't even work for 2 levels). To any one else with similar issues, good luck, and write Joins instead.

Nick




"N" <nmperez@water.ca.gov> wrote:
>
>I have been unable to find a single example on how to utilize the USER() function under SQL Builder, I have an easier way to run my query:
>SELECT ORADBA.PS_PROJECT_INFO.PROJECT_ID,ORADBA.PS_PROJECT_INFO.PROJECT_NAME,ORADBA.PS_PROJECT_INFO.PROJECT_DESC
>FROM ORADBA.PS_PROJECT_INFO
>WHERE ORADBA.PS_PROJECT_INFO.PROJECT_ID = (SELECT ORADBA.PS_PROJECT_EMPLOYEES.PROJECT_ID 
>                                    FROM ORADBA.PS_PROJECT_EMPLOYEES
>                                    WHERE ORADBA.PS_PROJECT_EMPLOYEES.EMPLOYEE_ID = (SELECT ORADBA.PS_EMPLOYEE_LOOKUP.EMPLOYEE_ID FROM ORADBA.PS_EMPLOYEE_LOOKUP WHERE ORADBA.PS_EMPLoYEE_LOOKUP.USERNAME = (SELECT USER from dual)));
>
>
>But for some reason it will not accept the this query ( i already ran it as a script via command line and it works)... So now I am trying to use the USER() function... Is there any documentation about these functions and how to use them. What I found in the help section was useless?
>Thank you for your help in advance..
>N
Technical Details
Message-ID: <45db3a0e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45d62c8a$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: "Nick" <nmperez@water.ca.gov>
Sender: "Nick" <nmperez@water.ca.gov>
Reply-To: "Nick" <nmperez@water.ca.gov>
Subject: Re: JBuilders SQL Builder, using functions?!?!?!?
Newsgroups: borland.public.jbuilder.database
X-User-Info: 136.200.198.98     
References:  <45d62c8a$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <45db3a0e$1@newsgroups.borland.com>
Date: 20 Feb 2007 10:12:30 -0800
X-Trace: newsgroups.borland.com 1171995150 207.105.83.66 (20 Feb 2007 10:12:30 -0800)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail