• Resolved jscmal

    (@jscmal)


    Hi,
    I have found out that if a query has the condition WHERE with” J < 0″, the shortcode print on screen the shortcode itself.

    Instead, with J > 0 or J = 0, it works properly

    Let me show the queries:

    This query with J > 0 (so as with J = 0) works very well:

    select E, G, I, J where E is not NULL and J > 0 order by J desc limit 10

    This query with J < 0 prints on screen the shortcode:

    select E, G, I, J where E is not NULL and J < 0 order by J asc limit 10

    I have not idea why this happens.

    The shortcode is this:

    [gdoc key=" ####### " query="select E, G, I, J where E is not NULL and J < 0 order by J asc limit 10" datatables_dom="false" class="no-datatables" use_cache="no"]

    The columns G, I, J have only numbers.

    I hope this can help to reproduce the case.

    The same query, on the spreadsheet, works properly.

    I give you some more details from the spreadsheet columns.

    Column G has rows like this:

    =IFERROR(IF(ISBLANK(B2), , INDEX(GoogleFinance("CURRENCY:"&B2,"price", TODAY()), 2, 2)))

    Colum H has rows like this:

    =IFERROR(IF(ISBLANK(B2), , INDEX(GoogleFinance("CURRENCY:"&B2,"price", TODAY()-1), 2, 2)))

    Colum I has rows like this:

    =IFERROR(IF(ISBLANK(B2), , G2-H2))

    Column J has rows like this:

    =IFERROR(IF(ISBLANK(B2), , I2/H2*100))

    Kind regards.

    G. Aloe

    • This topic was modified 7 years, 3 months ago by jscmal.
    • This topic was modified 7 years, 3 months ago by jscmal.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Meitar

    (@meitar)

    Please, please read this plugin’s FAQ before posting to this forum.

    Thread Starter jscmal

    (@jscmal)

    Thank you very much.

    There is always something to learn in life ??

    I didn’t consider the html use of < >

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Strange behavior with negative conditions in queries’ is closed to new replies.