How can I return boolean value to the client.
This doesn't work:
SELECT column1=case when exists (select ...) then TRUE else FALSE end,...
If I return :
SELECT column1=case when exists (select ...) then 1 else 0 end,...
then client gets the int32 value
regards,S> How can I return boolean value to the client.
You can't. There is no Boolean datatype in TSQL. There is a bit datatype, wh
ich is a integer-class
datatype restricted to the values 0, 1 and NULL. Some libraries (ADO etc) wi
ll interpret 1 as TRUE
and 0 as FALSE. If you want to return but, you have to CAST. for example
SELECT case when exists (select ...) then CAST(1 AS bit) else CAST(0 AS bit)
end AS column1
Or you can do the CAST outside the CASE.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"simon" <simon.zupan@.stud-moderna.si> wrote in message news:O3fYef9oFHA.3256@.tk2msftngp13.p
hx.gbl...
> How can I return boolean value to the client.
> This doesn't work:
> SELECT column1=case when exists (select ...) then TRUE else FALSE end,...
> If I return :
> SELECT column1=case when exists (select ...) then 1 else 0 end,...
> then client gets the int32 value
> regards,S
>|||There's no boolean data type in SQL. I'd suggest using the bit data type.
Like this:
ELECT column1=case when exists (select ...) then cast(1 as bit) else cast(0
as bit) end
ML
Showing posts with label client. Show all posts
Showing posts with label client. Show all posts
Thursday, March 29, 2012
Monday, March 19, 2012
Boilerplate activation SQL for high-throughput
OK, so assume I am recycling dialogs in my client code, and assume I am doing something similar to get a dialog handle in my TSQL. What should the activated stored procedure that is processing my queue look like if I am expecting thousands of messages per second? Assume also that there is a small bit of logic need to process each individual message? I am building for a high-throughput scenario and would like to get as much as possible out of each second-tier service broker server as possible before the aggregated data is moved up the chain to a master. The first tier is Express on a web server and exists primarily only as a forwarding mechanism.
It depends on what type of logic your activation procedure will be doing. If it is just taking a message off of the queue, then receive the message and log it (or whatever you need to do). It the logic is more intesive, and requires transactions your procedure code will be more complicated. Heres a link to check out activation procedures: http://articles.techrepublic.com.com/5100-9592_11-6156264.htmlSaturday, February 25, 2012
block a parameter
I have parametro call client, who is a list of clients, taken from the data
base to traves of a query, access the report through the URL, by means of
Internet to explorer, in some cases desire of passing parameter clients
already selected and who the user who is seeing the report cannot modify it,
As blockade the parameter?
--
ING. JOSE DAVID GALVIZ MUÑOZ
MCAD
DCE Tercera EstrellaHi Jose,
You can, either when designing the report or through Report Manager set the
parameter to No prompt. When you do this, the parameter will not be
displayed to the user, so the user will not be able to change the value.
-Lukasz
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"José David Galviz M" <joda_26@.hotmail.com> wrote in message
news:Okp1lnQcEHA.644@.tk2msftngp13.phx.gbl...
>I have parametro call client, who is a list of clients, taken from the data
> base to traves of a query, access the report through the URL, by means of
> Internet to explorer, in some cases desire of passing parameter clients
> already selected and who the user who is seeing the report cannot modify
> it,
> As blockade the parameter?
> --
> ING. JOSE DAVID GALVIZ MUÑOZ
> MCAD
> DCE Tercera Estrella
>|||Thanks
--
ING. JOSE DAVID GALVIZ MUÑOZ
MCAD
DCE Tercera Estrella
"Lukasz Pawlowski [MSFT]" <lukaszp@.online.microsoft.com> escribió en el
mensaje news:O%23bJnl1cEHA.1000@.TK2MSFTNGP12.phx.gbl...
> Hi Jose,
> You can, either when designing the report or through Report Manager set
the
> parameter to No prompt. When you do this, the parameter will not be
> displayed to the user, so the user will not be able to change the value.
> -Lukasz
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "José David Galviz M" <joda_26@.hotmail.com> wrote in message
> news:Okp1lnQcEHA.644@.tk2msftngp13.phx.gbl...
> >I have parametro call client, who is a list of clients, taken from the
data
> > base to traves of a query, access the report through the URL, by means
of
> > Internet to explorer, in some cases desire of passing parameter clients
> > already selected and who the user who is seeing the report cannot modify
> > it,
> > As blockade the parameter?
> >
> > --
> > ING. JOSE DAVID GALVIZ MUÑOZ
> > MCAD
> > DCE Tercera Estrella
> >
> >
>
base to traves of a query, access the report through the URL, by means of
Internet to explorer, in some cases desire of passing parameter clients
already selected and who the user who is seeing the report cannot modify it,
As blockade the parameter?
--
ING. JOSE DAVID GALVIZ MUÑOZ
MCAD
DCE Tercera EstrellaHi Jose,
You can, either when designing the report or through Report Manager set the
parameter to No prompt. When you do this, the parameter will not be
displayed to the user, so the user will not be able to change the value.
-Lukasz
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"José David Galviz M" <joda_26@.hotmail.com> wrote in message
news:Okp1lnQcEHA.644@.tk2msftngp13.phx.gbl...
>I have parametro call client, who is a list of clients, taken from the data
> base to traves of a query, access the report through the URL, by means of
> Internet to explorer, in some cases desire of passing parameter clients
> already selected and who the user who is seeing the report cannot modify
> it,
> As blockade the parameter?
> --
> ING. JOSE DAVID GALVIZ MUÑOZ
> MCAD
> DCE Tercera Estrella
>|||Thanks
--
ING. JOSE DAVID GALVIZ MUÑOZ
MCAD
DCE Tercera Estrella
"Lukasz Pawlowski [MSFT]" <lukaszp@.online.microsoft.com> escribió en el
mensaje news:O%23bJnl1cEHA.1000@.TK2MSFTNGP12.phx.gbl...
> Hi Jose,
> You can, either when designing the report or through Report Manager set
the
> parameter to No prompt. When you do this, the parameter will not be
> displayed to the user, so the user will not be able to change the value.
> -Lukasz
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "José David Galviz M" <joda_26@.hotmail.com> wrote in message
> news:Okp1lnQcEHA.644@.tk2msftngp13.phx.gbl...
> >I have parametro call client, who is a list of clients, taken from the
data
> > base to traves of a query, access the report through the URL, by means
of
> > Internet to explorer, in some cases desire of passing parameter clients
> > already selected and who the user who is seeing the report cannot modify
> > it,
> > As blockade the parameter?
> >
> > --
> > ING. JOSE DAVID GALVIZ MUÑOZ
> > MCAD
> > DCE Tercera Estrella
> >
> >
>
Subscribe to:
Posts (Atom)