
Signature
Hendrik Maryns
==================
www.lieverleven.be
http://aouw.org
I am performing a search within the DB. now i do not want to hardcode
the string, or use a linked list. i want to just say
fetchItemMain(this.aType()-------)
now i am not sure what goes in place of ------. so all i am saying is
give me all results which start with aType. but how should i do it
programmatically?
i hope this clarifies it.
Jan Thomä - 10 Mar 2006 13:33 GMT
> I am performing a search within the DB. now i do not want to hardcode
> the string, or use a linked list. i want to just say
[quoted text clipped - 5 lines]
>
> i hope this clarifies it.
Hi,
actually not really. What do you mean by DB? Are you talking about SQL
statements here? Can you maybe provide a bigger code snippet so we can
get an idea what do you want to achieve?
Best regards,
Jan
Hendrik Maryns - 10 Mar 2006 14:04 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message
sconeek@gmail.com schreef:
> I am performing a search within the DB. now i do not want to hardcode
> the string, or use a linked list. i want to just say
[quoted text clipped - 5 lines]
>
> i hope this clarifies it.
It doesn?t. See http://www.catb.org/~esr/faqs/smart-questions.html
Also interesting: http://mindprod.com/jgloss/newsgroups.html
H.

Signature
Hendrik Maryns
==================
www.lieverleven.be
http://aouw.org
tom fredriksen - 12 Mar 2006 17:40 GMT
> I am performing a search within the DB. now i do not want to hardcode
> the string, or use a linked list. i want to just say
[quoted text clipped - 3 lines]
> give me all results which start with aType. but how should i do it
> programmatically?
First lets try to understand what you want to do.
Normally I would interpret what you are saying as a mechanism to specify
with a sort of "pattern match" object with pattern values what you are
looking for, e.g.
getFromStorage( new anEmployee(name="?", salary>50000) )
Is this what you are thinking?
/tom
sconeek@gmail.com - 13 Mar 2006 00:28 GMT
ok. i hope this really clarfies it.
i have a postgres DB. my java code accesses this db. this table
contains a lot of records with field names. now i am trying to filter
data from within this table.
eg field name, name-lastname (mr-smith)
now i have a selected number of names, eg. mr,mrs,miss. so i have
specified these entries within a linkedlist.
so my current implementation is, fetchItemMain(linkedlist + "-" +
something);
but i want to replace linkedlist with "anything which starts with m".
so instead of running a loop x times based on the number of items
within my linkedlist, i want to say return anything which starts with
m.
i hope this helps. thanks.
tom fredriksen - 14 Mar 2006 09:53 GMT
> ok. i hope this really clarfies it.
> i have a postgres DB. my java code accesses this db. this table
[quoted text clipped - 9 lines]
> within my linkedlist, i want to say return anything which starts with
> m.
Whats the problem? Postgres has support for regexp text searches, look
it up in online db documents. In any case, you need to construct the sql
statement with the correct regexp in your application, how you do that
is up to you. A linked list is as good as any for such a purpose, unless
you are able to somehow automagically detect what you need without
writing any code for it.
/tom