0

select not working

The following is not working as expected (I think).

(select Table1)[Id < 50].Col2;

Table1 is a table with a few records, some with Id less than 50.

Col2 is a text field, filled with some text.

I'm running this piece of code in the Console and getting no output.

What am I doing wrong?

3 replies

null
    • Sean
    • 4 yrs ago
    • Reported - view

    Try number(Id)

    • JGM
    • Jose_Monteiro
    • 4 yrs ago
    • Reported - view

    It worked. :)

    What is weird is that the Id field already is a number type variable.
    am I wrong?

    Thanks for your help.

    • Sean
    • 4 yrs ago
    • Reported - view

    I'm just speculating... The select command returns an array so by using the number() function you are comparing number type to number type. If you use record(TableName, 1).Id = 1 in the Console, it will return "Yes" without converting it to a number, as long as the record Id 1 exists.

Content aside

  • 4 yrs agoLast active
  • 3Replies
  • 1119Views