on 02-28-2019 10:32 PM
I want to use if statement using something like @store1 like '%%%%%%41' in the macro and getting error message. Any thoughts?
Thank you
Hi,
Macro' IF conditional command is not supporting LIKE statement !
But you can try the below workaround (tested and working!)
@STORE12 = SQL(SELECT CASE WHEN $[$38.1.0] LIKE '%41' THEN 1 ELSE 0 END;
IF @STORE12 = 1
BEGIN
//Your code here
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much! Your code worked. I have to use or condition along with it. Everything worked correct
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you,
IF@STORE1 LIKE'%41'BEGIN//Your statement here
END is not working. It gives me an error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I believe you are storing a SQL statement's result at @STORE1 variable. Instead of comparing the @STORE1 why should not filter the result itself.
For example,
@STORE1 = SQL(Select ItemCode from RDR1 where ItemCode is like '%41’;
If you want to compare @STORE1 then try the below
IF @STORE1 LIKE '%41'
BEGIN
//Your statement here
END
Regards,
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. Yes, its SQL and B1UP. I want to select only items with '41' at the end. I am using @store1 like '%%%%%%41'. It gives me an error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.