Thanks for the input guys. The tables were put together by a
forum package, so I'm not terribly sure how to dig up the ddl; forgive
my ignorance.
Jeremy
@Jeremy
0
Reputation
4
Posts
108
Profile views
0
Followers
0
Following
Best posts made by Jeremy
This user hasn't posted anything yet.
Latest posts made by Jeremy
-
RE: Some SQL advice, maybe?
-
RE: WTF Gear Is Here!
The calendar idea is a good one. Like a 'best of' series.
I'd buy it, it it had some snappy explanation of what was wrong along
with the WTF code. You know, funny and educational.
-
RE: Some SQL advice, maybe?
Sorry for the double post, but the post came out unintentionally screwey. Is there not an edit button?
-
Some SQL advice, maybe?
So, my sql skills are sub-par. I'm learning. Scripting in
ColdFusion MX 6.1 with MSSQL 2000. I'm hoping some of you more
experienced developers can point me in the right direction.
Here's a query I've been working with. The intention is to select
users that belong to a specific forum but not to a specific group
within that forum. Is there a better/faster/more efficient way to
do this?SELECT a.iuserid AS iuserid, b.vchfirstname AS first, b.vchlastname AS last, b.vchnickname as nickname
FROM ftdb_forumusers AS a
LEFT JOIN ftdb_users AS b ON (a.iuserid = b.iuserid)
WHERE a.iforumid = #form.forum# AND
NOT (a.iuserid IN (SELECT iuserid FROM ftdb_groupusers WHERE igroupid = #form.group#))
ORDER BY b.vchlastname, b.vchfirstname