Prev: automatically assign value to query
Next: Converting dates to current dates to find out the evaluation date
From: Jarryd on 26 Jan 2010 08:11 Hi, How do you declare variables in an Access 2007 SELECT statement? I want to do something like: Dim PCLine as Integer SET PCLine = 0 SELECT IIf(Col1 = 1, "Cool", PCLine = Col1) AS Example; TIA, Jarryd
From: Tom van Stiphout on 26 Jan 2010 08:50
On Tue, 26 Jan 2010 13:11:43 -0000, "Jarryd" <jarryd(a)nodomain.com> wrote: SQL Is not appropriate for that; it is to operate on data in your tables. For data and variables in code, use VBA. -Tom. Microsoft Access MVP >Hi, > >How do you declare variables in an Access 2007 SELECT statement? > >I want to do something like: >Dim PCLine as Integer >SET PCLine = 0 >SELECT IIf(Col1 = 1, "Cool", PCLine = Col1) AS Example; > >TIA, > >Jarryd |