• Resolved mads

    (@madstudio)


    Hello,

    I have a Currency DS field. In the “Custom Query section” i insert:
    “SELECT column-name FROM table-name”
    > the “test query” work
    if i insert
    “SELECT SUM(column-name) FROM table-name”
    > the “test query” doesn´t work
    i need
    “SELECT SUM(column-name) FROM table-name WHERE condition”
    > How can i fix the problem?

    Can you help me, please?

    Best Regards.
    mads

    Version 10.0.301

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @madstudio,

    You always need to use the aliases in the “SELECT” clause or the plugin cannot identify the column that is used for the field’s value.

    SELECT SUM(column-name) as value FROM table-name WHERE condition

    Pay attention the “as value” in the query.

    In fields like DropDown DS fields (Checkbox DS, Radio Button DS), you should select at least two columns for values and texts (pay attention the hypothetical query below):

    SELECT column_name as value, column2_name as text FROM table_name WHERE condition

    Please, take into account that you sent me only hypothetical queries, I cannot ensure that the queries you are using are correct or not.

    Best regards.

    Thread Starter mads

    (@madstudio)

    Hei,

    it works. thank you.
    Thank you for the great support & the great plugin.

    best regards.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom Query SELECT SUM()’ is closed to new replies.