If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > MSAccess to Informix Translation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-05-05, 12:34
andrew_roberts andrew_roberts is offline
Registered User
 
Join Date: Jan 2005
Posts: 9
MSAccess to Informix Translation

Hi,

Does anyone know how to translate the below query (access) into informix?

SELECT X.USER_ID
FROM
(SELECT USERCERT.UserId as USER_ID, Count(1) as ITEM_COUNT FROM USERCERT GROUP BY USERCERT.UserId) AS X ,
(SELECT MgCrlArlRevoke.CertOwnerId as USER_ID, Count(1) as ITEM_COUNT FROM MgCrlArlRevoke GROUP BY MgCrlArlRevoke.CertOwnerId) AS Y
WHERE X.USER_ID = Y.USER_ID and Y.ITEM_COUNT =X.ITEM_COUNT;

Thanks.
Reply With Quote
  #2 (permalink)  
Old 01-11-05, 05:28
patrickley patrickley is offline
Registered User
 
Join Date: Jan 2005
Posts: 1
RE:MSAccess to Informix Translation

Question:

Does anyone know how to translate the below query (access) into informix?

SELECT X.USER_ID
FROM
(SELECT USERCERT.UserId as USER_ID, Count(1) as ITEM_COUNT FROM USERCERT GROUP BY USERCERT.UserId) AS X ,
(SELECT MgCrlArlRevoke.CertOwnerId as USER_ID, Count(1) as ITEM_COUNT FROM MgCrlArlRevoke GROUP BY MgCrlArlRevoke.CertOwnerId) AS Y
WHERE X.USER_ID = Y.USER_ID and Y.ITEM_COUNT =X.ITEM_COUNT;

Please try the following statement in Informix:

SELECT X.UserId
FROM USERCERT X
GROUP BY X.UserId
HAVING COUNT(*) = (SELECT COUNT(*) FROM MgCrlArlRevoke Y WHERE Y.CertOwnerId = X.UserId )

I not really tested this statement and hope it work fine. Please let me know whether this statement work fine in your environment.
Reply With Quote
  #3 (permalink)  
Old 01-11-05, 14:02
andrew_roberts andrew_roberts is offline
Registered User
 
Join Date: Jan 2005
Posts: 9
Thank you very much, worked great!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On