Hello,
Is it possible to define a global variable within a report? It has to be
populated in one DataSet and accessed from other DataSets.
Thanks,
Lucy.Related previous post:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=d0f4d02b-b032-47e8-8318-169052421237.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Lusy Crown" <evesq@.uk2.net> wrote in message
news:uad4evlaEHA.716@.TK2MSFTNGP11.phx.gbl...
> Hello,
> Is it possible to define a global variable within a report? It has to be
> populated in one DataSet and accessed from other DataSets.
> Thanks,
> Lucy.
>|||Probably not ;-(
How can I populate such variable (declared in custom code) in a DataSet?
Thanks,
Lucy.
"Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
news:%23gh%23zcnaEHA.2056@.TK2MSFTNGP12.phx.gbl...
> Related previous post:
>
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=d0f4d02b-b032-47e8-8318-169052421237.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Lusy Crown" <evesq@.uk2.net> wrote in message
> news:uad4evlaEHA.716@.TK2MSFTNGP11.phx.gbl...
> > Hello,
> >
> > Is it possible to define a global variable within a report? It has to be
> > populated in one DataSet and accessed from other DataSets.
> >
> > Thanks,
> > Lucy.
> >
> >
>
Showing posts with label variables. Show all posts
Showing posts with label variables. Show all posts
Monday, February 13, 2012
Saturday, February 11, 2012
@Variables
Just trying to confirm what I think I am seeing...
If I run a query which does something like this...
Select @.MyField = UserName
from dbo.signon
running this SQL statement inside a procedure does not produce anything in
terms of output row set? Just trying to confirm, that the client
application which is calling this procedure would not get any rows returned
(in this portion of the code) and that it is just setting some @. variables
for my later use within the Proc. Is that correct?
It is apparently "illegal" for me to have a statement like the following:
Select @.MyField = UserName, password
from dbo.signon
This is not a "real" situation, I am just trying to understand what I can
do and what I can not do. When I try this, I get the following error "A
SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.", which brings me to the conclusion that it
is illegal.
So in a situation where I needed to populate a "@.MyField" variable and also
retrieve the password (for some reason), this would be a two step process
(assuming no cursor logic)?
Thanks in advance for your assistance!!!!!!This is a multi-part message in MIME format.
--=_NextPart_000_00AC_01C3E587.E1CFBF20
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
No rows will be returned to the client when you use SELECT to populate
variables. You can populate multiple variables concurrently:
Select @.MyField = UserName
, @.MyFiled2 = password
from dbo.signon
Note: If your select would retrieve multiple rows, then the results are
unpredictable.
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Jim Heavey" <JimHeavey@.nospam.com> wrote in message
news:Xns947E5CB70CF08JimHeaveyhotmailcom@.207.46.248.16...
Just trying to confirm what I think I am seeing...
If I run a query which does something like this...
Select @.MyField = UserName
from dbo.signon
running this SQL statement inside a procedure does not produce anything in
terms of output row set? Just trying to confirm, that the client
application which is calling this procedure would not get any rows returned
(in this portion of the code) and that it is just setting some @. variables
for my later use within the Proc. Is that correct?
It is apparently "illegal" for me to have a statement like the following:
Select @.MyField = UserName, password
from dbo.signon
This is not a "real" situation, I am just trying to understand what I can
do and what I can not do. When I try this, I get the following error "A
SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.", which brings me to the conclusion that it
is illegal.
So in a situation where I needed to populate a "@.MyField" variable and also
retrieve the password (for some reason), this would be a two step process
(assuming no cursor logic)?
Thanks in advance for your assistance!!!!!!
--=_NextPart_000_00AC_01C3E587.E1CFBF20
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
No rows will be returned to the client =when you use SELECT to populate variables. You can populate multiple =variables concurrently:
Select @.MyField =3D UserName
, @.MyFiled2 =3D = password from dbo.signon
Note: If your select would retrieve multiple rows, then the results =are unpredictable.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Jim Heavey" wrote =in message news:Xns9=47E5CB70CF08JimHeaveyhotmailcom@.207.46.248.16...Just trying to confirm what I think I am seeing...If I run a query =which does something like this... Select @.MyField ==3D UserName from dbo.signonrunning this SQL =statement inside a procedure does not produce anything in terms of output row set? Just trying to confirm, that the client application which =is calling this procedure would not get any rows returned (in this =portion of the code) and that it is just setting some @. variables for my later =use within the Proc. Is that correct?It is apparently ="illegal" for me to have a statement like the following: Select =@.MyField =3D UserName, password from =dbo.signonThis is not a "real" situation, I am just trying to understand what I can =do and what I can not do. When I try this, I get the following error "A SELECT statement that assigns a value to a variable must not be =combined with data-retrieval operations.", which brings me to the conclusion =that it is illegal.So in a situation where I needed to populate a ="@.MyField" variable and also retrieve the password (for some reason), this =would be a two step process (assuming no cursor logic)?Thanks in =advance for your assistance!!!!!!
--=_NextPart_000_00AC_01C3E587.E1CFBF20--
If I run a query which does something like this...
Select @.MyField = UserName
from dbo.signon
running this SQL statement inside a procedure does not produce anything in
terms of output row set? Just trying to confirm, that the client
application which is calling this procedure would not get any rows returned
(in this portion of the code) and that it is just setting some @. variables
for my later use within the Proc. Is that correct?
It is apparently "illegal" for me to have a statement like the following:
Select @.MyField = UserName, password
from dbo.signon
This is not a "real" situation, I am just trying to understand what I can
do and what I can not do. When I try this, I get the following error "A
SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.", which brings me to the conclusion that it
is illegal.
So in a situation where I needed to populate a "@.MyField" variable and also
retrieve the password (for some reason), this would be a two step process
(assuming no cursor logic)?
Thanks in advance for your assistance!!!!!!This is a multi-part message in MIME format.
--=_NextPart_000_00AC_01C3E587.E1CFBF20
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
No rows will be returned to the client when you use SELECT to populate
variables. You can populate multiple variables concurrently:
Select @.MyField = UserName
, @.MyFiled2 = password
from dbo.signon
Note: If your select would retrieve multiple rows, then the results are
unpredictable.
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Jim Heavey" <JimHeavey@.nospam.com> wrote in message
news:Xns947E5CB70CF08JimHeaveyhotmailcom@.207.46.248.16...
Just trying to confirm what I think I am seeing...
If I run a query which does something like this...
Select @.MyField = UserName
from dbo.signon
running this SQL statement inside a procedure does not produce anything in
terms of output row set? Just trying to confirm, that the client
application which is calling this procedure would not get any rows returned
(in this portion of the code) and that it is just setting some @. variables
for my later use within the Proc. Is that correct?
It is apparently "illegal" for me to have a statement like the following:
Select @.MyField = UserName, password
from dbo.signon
This is not a "real" situation, I am just trying to understand what I can
do and what I can not do. When I try this, I get the following error "A
SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.", which brings me to the conclusion that it
is illegal.
So in a situation where I needed to populate a "@.MyField" variable and also
retrieve the password (for some reason), this would be a two step process
(assuming no cursor logic)?
Thanks in advance for your assistance!!!!!!
--=_NextPart_000_00AC_01C3E587.E1CFBF20
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
No rows will be returned to the client =when you use SELECT to populate variables. You can populate multiple =variables concurrently:
Select @.MyField =3D UserName
, @.MyFiled2 =3D = password from dbo.signon
Note: If your select would retrieve multiple rows, then the results =are unpredictable.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Jim Heavey"
--=_NextPart_000_00AC_01C3E587.E1CFBF20--
@Variables
Just trying to confirm what I think I am seeing...
If I run a query which does something like this...
Select @.MyField = UserName
from dbo.signon
running this SQL statement inside a procedure does not produce anything in
terms of output row set? Just trying to confirm, that the client
application which is calling this procedure would not get any rows returned
(in this portion of the code) and that it is just setting some @. variables
for my later use within the Proc. Is that correct?
It is apparently "illegal" for me to have a statement like the following:
Select @.MyField = UserName, password
from dbo.signon
This is not a "real" situation, I am just trying to understand what I can
do and what I can not do. When I try this, I get the following error "A
SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.", which brings me to the conclusion that it
is illegal.
So in a situation where I needed to populate a "@.MyField" variable and also
retrieve the password (for some reason), this would be a two step process
(assuming no cursor logic)?
Thanks in advance for your assistance!!!!!!No rows will be returned to the client when you use SELECT to populate
variables. You can populate multiple variables concurrently:
Select @.MyField = UserName
, @.MyFiled2 = password
from dbo.signon
Note: If your select would retrieve multiple rows, then the results are
unpredictable.
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Jim Heavey" <JimHeavey@.nospam.com> wrote in message
news:Xns947E5CB70CF08JimHeaveyhotmailcom
@.207.46.248.16...
Just trying to confirm what I think I am seeing...
If I run a query which does something like this...
Select @.MyField = UserName
from dbo.signon
running this SQL statement inside a procedure does not produce anything in
terms of output row set? Just trying to confirm, that the client
application which is calling this procedure would not get any rows returned
(in this portion of the code) and that it is just setting some @. variables
for my later use within the Proc. Is that correct?
It is apparently "illegal" for me to have a statement like the following:
Select @.MyField = UserName, password
from dbo.signon
This is not a "real" situation, I am just trying to understand what I can
do and what I can not do. When I try this, I get the following error "A
SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.", which brings me to the conclusion that it
is illegal.
So in a situation where I needed to populate a "@.MyField" variable and also
retrieve the password (for some reason), this would be a two step process
(assuming no cursor logic)?
Thanks in advance for your assistance!!!!!!
If I run a query which does something like this...
Select @.MyField = UserName
from dbo.signon
running this SQL statement inside a procedure does not produce anything in
terms of output row set? Just trying to confirm, that the client
application which is calling this procedure would not get any rows returned
(in this portion of the code) and that it is just setting some @. variables
for my later use within the Proc. Is that correct?
It is apparently "illegal" for me to have a statement like the following:
Select @.MyField = UserName, password
from dbo.signon
This is not a "real" situation, I am just trying to understand what I can
do and what I can not do. When I try this, I get the following error "A
SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.", which brings me to the conclusion that it
is illegal.
So in a situation where I needed to populate a "@.MyField" variable and also
retrieve the password (for some reason), this would be a two step process
(assuming no cursor logic)?
Thanks in advance for your assistance!!!!!!No rows will be returned to the client when you use SELECT to populate
variables. You can populate multiple variables concurrently:
Select @.MyField = UserName
, @.MyFiled2 = password
from dbo.signon
Note: If your select would retrieve multiple rows, then the results are
unpredictable.
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Jim Heavey" <JimHeavey@.nospam.com> wrote in message
news:Xns947E5CB70CF08JimHeaveyhotmailcom
@.207.46.248.16...
Just trying to confirm what I think I am seeing...
If I run a query which does something like this...
Select @.MyField = UserName
from dbo.signon
running this SQL statement inside a procedure does not produce anything in
terms of output row set? Just trying to confirm, that the client
application which is calling this procedure would not get any rows returned
(in this portion of the code) and that it is just setting some @. variables
for my later use within the Proc. Is that correct?
It is apparently "illegal" for me to have a statement like the following:
Select @.MyField = UserName, password
from dbo.signon
This is not a "real" situation, I am just trying to understand what I can
do and what I can not do. When I try this, I get the following error "A
SELECT statement that assigns a value to a variable must not be combined
with data-retrieval operations.", which brings me to the conclusion that it
is illegal.
So in a situation where I needed to populate a "@.MyField" variable and also
retrieve the password (for some reason), this would be a two step process
(assuming no cursor logic)?
Thanks in advance for your assistance!!!!!!
Subscribe to:
Posts (Atom)