<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>12 Feb 2016 18:44:00 Z</lastBuildDate><pubDate>10 Feb 2016 01:42:00 Z</pubDate><description>I can't figure out how to reference global variables in a SQL statement.&#13;
I have a table called clockinout with an int element called storenum.&#13;
In the table I have many records with a storenum of 10. Using the following SQL works fine:&#13;
"Select * from clockinout where clockinout.storenum = 10 "&#13;
but the following does not:&#13;
gnThisStoreNum=10&#13;
"Select * from clockinout where clockinout.storenum = gnThisStoreNum "&#13;
Nor does this:&#13;
"Select * from clockinout where clockinout.storenum = 'gnThisStoreNum' "</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement/read.awp</link><title>Referencing variables in a SQL statement</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56397/read.awp</comments><pubDate>12 Feb 2016 18:44:00 Z</pubDate><description>Your problem is only in the generation of the select, just use:&#13;
"Select * from clockinout where clockinout.storenum ="+ gnThisS…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56397/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56397/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement/read.awp">Referencing variables in a SQL statement</source><title>Re: Referencing variables in a SQL statement</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56342/read.awp</comments><pubDate>10 Feb 2016 14:44:00 Z</pubDate><description>Fabrice&#13;
&#13;
'when you change DB type, it automatically translates the sql language for the target DB'&#13;
&#13;
really....&#13;
&#13;
Define a c…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56342/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56342/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement/read.awp">Referencing variables in a SQL statement</source><title>Re: Referencing variables in a SQL statement</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56341/read.awp</comments><pubDate>10 Feb 2016 14:19:00 Z</pubDate><description>Hi again&#13;
&#13;
"nice" is not why you should use it. The reasons are:&#13;
- when you use it and you change the analysis, it changes the…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56341/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56341/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement/read.awp">Referencing variables in a SQL statement</source><title>Re: Referencing variables in a SQL statement</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56322/read.awp</comments><pubDate>10 Feb 2016 04:20:00 Z</pubDate><description>Ahhh - thank you! Used to using it as a direct language. The query editor is a little cumbersome for simple sql statements, but …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56322/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56322/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement/read.awp">Referencing variables in a SQL statement</source><title>Re: Referencing variables in a SQL statement</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56321/read.awp</comments><pubDate>10 Feb 2016 01:51:00 Z</pubDate><description>Hi Peter,&#13;
&#13;
1. You should use the query editor for that, it's much simpler&#13;
&#13;
2. IF you -REALLY- want to write yor own sql code…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56321/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement-56321/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56315-referencing-variables-sql-statement/read.awp">Referencing variables in a SQL statement</source><title>Re: Referencing variables in a SQL statement</title></item></channel></rss>
