Is it possible to define variables in List Manager?

Is it possible to define variables in List Manager?

DECLARE @the_date datetime
SET @the_date = getdate()
SELECT DISTINCT a.customer_no
    FROM T_CUSTOMER a
        WHERE a.inactive = 1
        AND a.cust_type = 1 
and a.create_dt <= @the_date

I tried to create a list by manual edit, but the above script won't work.

The error message says,
"Illegal SQL statement"


Any advice would be appreciated

 



[edited by: Vicky Wenhan Yu at 12:17 PM (GMT -6) on 29 Mar 2010]
Parents
  • Former Member
    Former Member $organization

    I'm afraid multiple statements are prohibited in the SQL query editor; this is done as part of our effort to prevent "SQL injection attacks", which would allow malicious users to enter statements that might alter or delete data or objects from the database.

Reply
  • Former Member
    Former Member $organization

    I'm afraid multiple statements are prohibited in the SQL query editor; this is done as part of our effort to prevent "SQL injection attacks", which would allow malicious users to enter statements that might alter or delete data or objects from the database.

Children