Join 2 like queries

2004-04-09 Thread Robert Everland III
Is there a way that I can join 2 queries that have the exact same columns returned. Let me give you some background. I am trying to query an ldap server. It can only return 1000 users, so I had to filter it. So I had to make 2 different ldap queries that both return the same columns but have different information. I want to join them together without have to run 2 different loops to do some other things I'm doing. So anyone have any idea?

Bob Everland
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Join 2 like queries

2004-04-09 Thread Barney Boisvert
UNION is your saviour, and you can even do it with a QofQ:

cfldap ... Name=ldap1 /
cfldap ... Name=ldap2 /

cfquery dbtype=query name=ldap
 SELECT *
 FROM ldap1
UNION
 SELECT *
 FROM ldap2
/cfquery

Cheers
barneyb


 -Original Message-
 From: Robert Everland III [mailto:[EMAIL PROTECTED] 
 Sent: Friday, April 09, 2004 8:52 AM
 To: CF-Talk
 Subject: Join 2 like queries
 
 Is there a way that I can join 2 queries that have the exact 
 same columns returned. Let me give you some background. I am 
 trying to query an ldap server. It can only return 1000 
 users, so I had to filter it. So I had to make 2 different 
 ldap queries that both return the same columns but have 
 different information. I want to join them together without 
 have to run 2 different loops to do some other things I'm 
 doing. So anyone have any idea?
 
 
 Bob Everland
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]