dpQuery - variable in WHERE

Find and share HowTos to various installations / configurations!
2 posts • Page 1 of 1
Balewski
Posts:13
Joined: Tue Aug 22, 2017 9:52 am

dpQuery - variable in WHERE

Post by Balewski »

Hi all,

I am trying to use a variable in dpQuery in WHERE section:

bit32 x=00000000000000000000000000000001;

dpQuery("SELECT '_online.._value' FROM '*.konfig.grupa*' WHERE ('_online.._value'&\\""+x+"\\")==\\""+x+"\\" " ,tab);

it does not find anything.

when I do it like this:

dpQuery("SELECT '_online.._value' FROM '*.konfig.grupa*' WHERE ('_online.._value'&00000000000000000000000000000001)==00000000000000000000000000000001 " ,tab);

it works fine.

Any help?

Thanks.
Michal

dbindernagel
Posts:161
Joined: Mon Feb 23, 2015 1:34 pm

Re: dpQuery - variable in WHERE

Post by dbindernagel »

The query you are creating for the dpQuery is different than the query in your working example.

Code: Select all

SELECT '_online.._value' FROM '*.konfig.grupa*' WHERE ('_online.._value'&"00000000000000000000000000000001")=="00000000000000000000000000000001" 

Code: Select all

SELECT '_online.._value' FROM '*.konfig.grupa*' WHERE ('_online.._value'&00000000000000000000000000000001)==00000000000000000000000000000001 

2 posts • Page 1 of 1