Home › Forums › kdb+ › select with assignment › Reply To: select with assignment
-
Hello powerpeanuts,
In q, the select statement operates in a manner that doesn’t allow for the assignment of temporary variables within the select statement itself. Therefore, the behavior you’re describing, where you can assign a temporary variable during select and reuse it within the same column, isn’t supported.
The select statement in q typically operates on columns of a table or on the result of an expression, but it doesn’t support intermediate assignment of variables like in some other programming languages.
To achieve the desired result, you may need to break down the calculation into separate steps or use functions to manipulate the data in the way you intend.
Thanks for sharing https://learninghub.kx.com/forums/topic/select-with-assignment/salesforce cpq
Thank you
Stevediaz
learninghub.kx.com
select with assignment - KX Learning Hub
I remember in q, we can assign a temporary variable during select and use it again in the same column, but seems it is not working.