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 Reply Children
  • Hello Steven,

    Thank you very much for your reply.

    I just found that the criteria is in table T_LIST and the criteria is defined as Varchar (4000). Is it ok for me just change the varchar(4000) to varchar(max)?

    Thank you and good night ^_^

     

  • Former Member
    Former Member $organization in reply to Vicky Wenhan Yu

    No, we do not support changes to production tables that you have not created yourself because these changes may be reversed in future database update scripts. Further, that won't affect the length of the query you can enter in List Manager because the limit is set in the client application, and I cannot guarantee that entering your query directly into that column by another means will work properly.