Hello,
I am quering some dps containing a dyn_string. I need only the dps with a particular value in their dyn_string.
I tried to use: WHERE '_original.._value' == "MySearch" Unfortunately does not work for dyn_strings.
I have tried IN statement with no positive result either,
Somebody can give me a hand with this?
Thank you in advance
SQL Query: WHERE IN
- kilianvp
- Posts:443
- Joined: Fri Jan 16, 2015 10:29 am
Re: SQL Query: WHERE IN
yes try this
Code: Select all
main()
{
dyn_dyn_anytype tab;
dpQuery("SELECT '_original.._value' FROM '*.**' WHERE '_original.._value' == \\"MySearch\\" ", tab);
DebugTN(tab);
}- WINOA
- Posts:15
- Joined: Mon Apr 09, 2018 3:24 pm
Re: SQL Query: WHERE IN
Hello,
Thanks for your answer.
But I am afraid it is not working for me.
The dyn_string is in the following structure:
DPexample (DPEexample)
Folder1
dynString (PosibleValue1, PosibleValue2, PosibleValue3)
The query I tried is:
dpQuery("SELECT '_original.._value' "
"FROM '*.**'"
"WHERE _DPT = \\"DPEexample\\" AND '_original.._value' == \\"PosibleValue1\\" "
, tab);
The result is empty. I have also tried with *.*** but no result.
Thanks
Thanks for your answer.
But I am afraid it is not working for me.
The dyn_string is in the following structure:
DPexample (DPEexample)
Folder1
dynString (PosibleValue1, PosibleValue2, PosibleValue3)
The query I tried is:
dpQuery("SELECT '_original.._value' "
"FROM '*.**'"
"WHERE _DPT = \\"DPEexample\\" AND '_original.._value' == \\"PosibleValue1\\" "
, tab);
The result is empty. I have also tried with *.*** but no result.
Thanks
- WINOA
- Posts:15
- Joined: Mon Apr 09, 2018 3:24 pm
Re: SQL Query: WHERE IN
Any idea what I am doing wrong?
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: SQL Query: WHERE IN
In my tests the LIKE comparison works for a dyn variable. I have tested it for a dyn_int, probably it also works for strings.
The query string I have used is
SELECT '_online.._value' FROM '{_Connections.Ui.ManNums}' WHERE '_online.._value' LIKE "*3*"
Best Regards
Leopold Knipp
Senior Support Specialist
The query string I have used is
SELECT '_online.._value' FROM '{_Connections.Ui.ManNums}' WHERE '_online.._value' LIKE "*3*"
Best Regards
Leopold Knipp
Senior Support Specialist