I forgot, we're running ARS 7.0.1 patch 003 and MS SQL 2005.
Matthew C. Gayford Technology Research & Development Information Technology Systems Division University of North Carolina Wilmington (910) 962-7177 From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Gayford, Matthew C. Sent: Wednesday, February 20, 2008 2:52 PM To: arslist@ARSLIST.ORG Subject: Direct SQL - Using current request ID ** Hi List, I've got a button on the AR System Email Messages form that executes an active link with a direct SQL action. The SQL statement needs to get data from the current request, so I'm basing that on the Email ID field. However, I can't seem to get the where clause to work. Here's what I've tried. Statement: WHERE Email_ID = $Email ID$ Result: ARERR [552] Failure during SQL operation to the database : Incorrect syntax near '='. (SQL Server 102) Statement: WHERE Email_ID = '$Email ID$' Result: No item matches active link conditions - I checked the SQL log and see this WHERE Email_ID = ' ' but if I run a report on the form I'm working on I can see the Email ID field is populated. Statement: WHERE Email_ID = "$Email ID$" Result: *** ERROR *** An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Add a name or single space as the alias name. TIA, Matt Matthew C. Gayford Technology Research & Development Information Technology Systems Division University of North Carolina Wilmington (910) 962-7177 __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" html___ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"