<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>13 Jul 2018 19:38:00 Z</lastBuildDate><pubDate>13 Jul 2018 14:12:00 Z</pubDate><description>Good day&#13;
&#13;
How can you use a parameter inside a query in a CASE statement.&#13;
&#13;
I.e. I want to pass a parameters {Period} = 2 as a field in the query and then se that in a case i.e. CASE WHEN Period = 1 then blah blah else blah blah END&#13;
&#13;
So my query reads:&#13;
&#13;
SELECT xyz, 1 as Period, CASE WHEN Period = 1 etc. etc. from tablename&#13;
&#13;
Thanks in advance&#13;
&#13;
&#13;
&#13;
Ericus Steyn</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/66154-21-sql-query/read.awp</link><title>[WD 21]SQL Query</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/66154-21-sql-query-solved-found-workaround-66157/read.awp</comments><pubDate>13 Jul 2018 19:38:00 Z</pubDate><description>Maybe to try with&#13;
sSQL is string = "SELECT xyz, 1 as Period, CASE WHEN Period = %1 etc. etc. from tablename"&#13;
&#13;
StringBuild(sSQ…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/66154-21-sql-query-solved-found-workaround-66157/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/66154-21-sql-query-solved-found-workaround-66157/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/66154-21-sql-query/read.awp">[WD 21]SQL Query</source><title>Re: [WD 21]SQL Query - SOLVED found a workaround</title></item></channel></rss>
