Hello,

I am doing a website that incorporates SQL and one of the things is which user to query for. In this part, I would like to put
the variable 'AllUsers' which consists of all the users, do you have any suggestions on how this can be done, here is what I
have without a query for 'AllUsers' in HTML:

<SELECT NAME=&#34;targetUserID&#34;>
<OPTION VALUE=&#34;AllUsers&#34;>All Users</OPTION>
<!-- =queryString &#34;select distinct rtrim(userID) from
Track..cUsers order by userID&#34; -->
<!-- ?{sqlBlock $queryString crux 2000 0 -1 errorString tmpuserID -->
<OPTION VALUE= &#34;<!-- $ $tmpuserID -->&#34;
<!-- ({ $tmpuserID == $targetUserID --> SELECTED<!-- (} -->>
<!-- $ $tmpuserID --></OPTION>
<!-- ?}sqlBlock -->
</SELECT>

Here is what I thought would work, but it didn&#39;t:

<SELECT NAME=&#34;targetUserID&#34;>
<!-- =queryString &#34;declare @AllUsers varchar(16) select @AllUsers = userID from Track..cUsers&#34; -->
<!-- ?{sqlBlock $queryString crux 2000 0 -1 errorString AllUsers -->
<OPTION VALUE=&#34;AllUsers&#34;>All Users</OPTION>
<!-- ?}sqlBlock -->

<!-- =queryString &#34;select distinct rtrim(userID) from
Track..cUsers order by userID&#34; -->
<!-- ?{sqlBlock $queryString crux 2000 0 -1 errorString tmpuserID -->
<OPTION VALUE= &#34;<!-- $ $tmpuserID -->&#34;
<!-- ({ $tmpuserID == $targetUserID --> SELECTED<!-- (} -->>
<!-- $ $tmpuserID --></OPTION>
<!-- ?}sqlBlock -->
</SELECT>



In case you dont like how that looks here is what I thought would work just in SQL:

declare @AllUsers varchar(16)
select @AllUsers = userID
from Track..cUsers

I also tried to do it with my query for the final information, but that didnt work either it went something like this:

select DATEDIFF( hour, startTime, stopTime), cSlice.projectID &#34; +
from Track..cSlice, Track..cProjects
where &#39;&#34; + $targetUserID + &#34;&#39; = &#39;AllUsers&#39;
and clientID = &#39;&#34; + $targetClientID + &#34;&#39;
and state = &#39;Stopped&#39;
and typeID = &#39;Billable&#39;
and cSlice.projectID = cProjects.projectID
and startTime like &#39;&#34; + $targetMonth + &#34;%&#39;
or userID = &#39;&#34; + $targetUserID + &#34;&#39;
and clientID = &#39;&#34; + $targetClientID + &#34;&#39;
and state = &#39;Stopped&#39;
and typeID = &#39;Billable&#39;
and cSlice.projectID = cProjects.projectID
and startTime like &#39;&#34; + $targetMonth + &#34;%&#39;
order by cSlice.projectID

Any help would be greatly appreciated, Thank you for your time.
Nathan Czuba