|bod1467 on Jan 7, 2009 at 6:47:46 AM (# 12)|
Do a search on SQL JOIN ... there are ways of structuring the SQL command to get exactly what you want. :o)
brian on Jan 7, 2009 at 7:35:02 AM (# 13)
a join wouldn't affect the results if the above query pulls back the wrong results.
This wouldn't be a mysql database by any chance? I had fun with it a few years back
You could try using a
select a.*,b.* from a inner join b on a.field=b.field
but it is essentially the same as what you had before.
Monte on Jan 7, 2009 at 1:08:13 PM (# 14)
No, it's an Oracle database.
I have to use two queries, because one of them is dynamically generated based on certain code variables.
ChrisRickard on Jan 7, 2009 at 8:24:39 PM (# 15)
Hi Markus! Yeah I still lurk every once and a while, but even that's getting less and less.
brian on Jan 8, 2009 at 1:00:15 AM (# 16)
Chirs - you should use a feed reader. That wat you can stick your head in whenever you see something interesting.
Monte - why don't you just include the second part of the query in the dynamically generated one and eliminate the need for 2 queries?
you could do it something like
from a,(select * from c) as b
where the select * from c is your dynamic query. My oracle is a little rusty but I;m sure you could do that in a stored procedure or something.
Monte on Jan 8, 2009 at 4:08:48 AM (# 17)
It's the nature of the database. It's difficult to explain without going into a whole lot of detail.
AnnieCalvert on Jul 31, 2012 at 9:26:38 PM (# 18)
You need a service that can create an object based on varying input ( So, the object returned will always be the same, and only the input will differ? This does sound a lot like you have things a little confused in your code, and with some reorganization, you will just need to use the strategy pattern'