Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
Can anyone please tell me when to use LET Statement and SET Statement? I am finding it hard to understand the difference between using the two statements.
Thank you!
A LET statement will evaluate the expression after the equals sign, whereas a SET statement will put whatever expression you have after the equals sign into your variable.
LET x = max(Date);
will put the value of max(Date) in your variable
SET x = max(Date)
will put the string 'max(Date)' into your variable
Hi Michael,
SET is used to assign a vlue to a variable 'as is'.
LET is used when the variable is assigned in some calculation
So, if you use
SET var = 1+1 --> var contains '1+1'
LET var = 1+1 --> var contains '2'