logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: ANY subquery and PreparedStatements: msg#00286

db.postgresql.jdbc

Subject: Re: ANY subquery and PreparedStatements

This is impossible because of the framework we use here... The SQLs
aren't stored in java code, but in a separate XML file

On Wed, 2003-02-19 at 15:12, David Wall wrote:
> > You're right... but it's actually based on user interaction (i.e.:
> > selecting items using checkboxes)
> > I guess I'll just have to issue a query per item... ugly :-(
>
> Why can't you simply build the prepared statement on the fly based on the
> number of values to be placed in the IN list? If you have 3 items, you just
> append three '?' and if you have 20 items, then you append 20 '?' to your
> list. This way the number of '?' will match the number of
> PreparedStatement.setXXX() calls and you don't have to rely on the database
> handling all the nulls. Since the list is fairly dynamic anyway, it's
> overall performance will be about the same (and it's much better than doing
> a series of queries instead).
>
> Of course, there are limits on how long a query can be for most databases,
> so you may find that if the list is too long, you'll run into query
> processor problems.
>
> David
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--

Felipe Schnack
Analista de Sistemas
felipes@xxxxxxxxxxxxxxxx
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
ritter@xxxxxxxxxxxxxxxx
Fone/Fax.: (51)32303341


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx






Only community members can participate in forum threads. You must Register or log in to contribute.

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
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 | sitemap | advertise | OSDir is an inevitable website. super tiny logo