158
Views
7
Comments
Why test query is not showing the result?
Question

Do you know why this advanced sql query:


SELECT 

    RTRIM(ID)

FROM 

    {TB}

WHERE {TB}.[COD] = @COD


When the Test button is clicked with "test1" in test value shows "Query returned no rows" but if the query is tested like this (with the parameter 'test1' directly passed:


SELECT 

    RTRIM(ID)

FROM 

    {TB}

WHERE {TB}.[COD] = 'test1'


the test query returns the result?

2025-11-19 06-14-01
Miguel Verdasca
Champion

Are you passing values for the input parameters?

2025-11-19 06-14-01
Miguel Verdasca
Champion

Please, check the follow pic:

UserImage.jpg
John Jake

Yes I have there "test1". 

2025-11-19 06-14-01
Miguel Verdasca
Champion

Can you take a pic from your test value?

Note: just more information


Edit:

Please, check this documetn Building Dynamic SQL Statements the Right Way


Edit 2:

Try use LIKE instance of =

2021-08-30 15-28-09
Leandro Correa

Hi John,

Are you using a external database ou platform repository?

Are you sure about the query is correct and the output structure is accordingly?

2026-02-26 06-29-24
Rahul
 
MVP

John Jake wrote:

Do you know why this advanced sql query:


SELECT 

    RTRIM(ID)

FROM 

    {TB}

WHERE {TB}.[COD] = @COD


When the Test button is clicked with "test1" in test value shows "Query returned no rows" but if the query is tested like this (with the parameter 'test1' directly passed:


SELECT 

    RTRIM(ID)

FROM 

    {TB}

WHERE {TB}.[COD] = 'test1'


the test query returns the result?

Hi John,

I think you should have to check once your input variable expand inline property.

it should to be set no.


Hope this will help you.


Regards

Rahul Sahu



2020-02-05 04-54-55
Changalrao Bairaboyana

John Jake wrote:

Do you know why this advanced sql query:


SELECT 

    RTRIM(ID)

FROM 

    {TB}

WHERE {TB}.[COD] = @COD


When the Test button is clicked with "test1" in test value shows "Query returned no rows" but if the query is tested like this (with the parameter 'test1' directly passed:


SELECT 

    RTRIM(ID)

FROM 

    {TB}

WHERE {TB}.[COD] = 'test1'


the test query returns the result?

Hello,


Please check the data type of the input parameter you are passing and also check if that input value is relevant to the data type of the entity attribute as well.

Hope it works! 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.