Kaup, Chester
Chester_Kaup at kindermorgan.com
Thu Apr 9 09:54:21 CDT 2009
I haven't had a chance to get back to it. Had some new software to implement and other priorities from the boss. I am going to try to get it in one query. I am not a big fan of temp tables. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte Sent: Thursday, April 09, 2009 8:44 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Using recordset in a query Chester, Was curious if this was solved?...and what direction you went. Thanks, Mark ---------------------------------------- > From: Chester_Kaup at kindermorgan.com > To: accessd at databaseadvisors.com > Date: Mon, 6 Apr 2009 15:03:05 -0500 > Subject: [AccessD] Using recordset in a query > > I am trying to use the following query but am getting no records returned. Can this be done or am I approaching this all wrong? > > Set RS1 = MyDb.OpenRecordset(strSql) > > strSql = "SELECT dbo_DSS_StatusChanges.PID, RS1.Fields(1), " & _ "dbo_DSS_StatusChanges.StatusDate, dbo_DSS_StatusChanges.Status " & _ > "FROM RS1 INNER JOIN dbo_DSS_StatusChanges ON " & _ > "(RS1.Fields(3) = dbo_DSS_StatusChanges.StatusDate) AND " & _ > "(RS1.Fields(0) = dbo_DSS_StatusChanges.PID) " & _ > "GROUP BY dbo_DSS_StatusChanges.PID, RS1.Fields(1), " & _ "dbo_DSS_StatusChanges.StatusDate, dbo_DSS_StatusChanges.Status;" > > Chester Kaup > Engineering Technician > Kinder Morgan CO2 Company, LLP > Office (432) 688-3797 > FAX (432) 688-3799 > > > No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com _________________________________________________________________ Rediscover Hotmail(r): Get quick friend updates right in your inbox. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com