2009 Sep 06 9:24 AM
when i use where number = '999' or number = 999 what's the difftent...
2009 Sep 06 9:55 AM
Hi,
When you use the assignment operator with quotes, what ever value is entered within quotes will be assigned to that variable.
Eg,.
data: number type i.
number = '999'.
write: number.
Here 999 will be the output. i,e the value 999 is assigned to number when specified within quotes.
When you use direct assignment,
data: number type i,
999 type i.
999 = ' 555'.
number = 999.
write: number.
When you assign a variable to another variable you wont use quotes. In the above example 999 is a variable and not a value. Only 555 is the value assigned in quotes. So the output will be 555.
Hope you are clear now.
Regards,
Vikranth
2009 Sep 06 9:55 AM
Hi,
When you use the assignment operator with quotes, what ever value is entered within quotes will be assigned to that variable.
Eg,.
data: number type i.
number = '999'.
write: number.
Here 999 will be the output. i,e the value 999 is assigned to number when specified within quotes.
When you use direct assignment,
data: number type i,
999 type i.
999 = ' 555'.
number = 999.
write: number.
When you assign a variable to another variable you wont use quotes. In the above example 999 is a variable and not a value. Only 555 is the value assigned in quotes. So the output will be 555.
Hope you are clear now.
Regards,
Vikranth
2009 Sep 06 10:28 AM
above post explain clearly .
quotes are useed for char and sting . but when u will assigned to the variable which is a typr of integer then inside quotes values it will assigned to the variable .
but in case of string its must u have to provide a value in quotes. ''
rgds aryan
2009 Sep 06 10:51 AM