I am migrating a database from Access to SQL Server 2000. In Access, I had
several Parameter Queries set up so that users could specify a parameter
based on their need. I combed through Books on Line and figured out how to
do it in Query Designer. Is there a way to save this query with the set up
parameters into a view so that I can have other users re-use it?
thank you
See "Inline User-Defined Functions" in BOL.
AMB
"gmead7" wrote:
> I am migrating a database from Access to SQL Server 2000. In Access, I had
> several Parameter Queries set up so that users could specify a parameter
> based on their need. I combed through Books on Line and figured out how to
> do it in Query Designer. Is there a way to save this query with the set up
> parameters into a view so that I can have other users re-use it?
> thank you
|||A view acts like a table in SQL Server. E.G. "Select * from Table_View"
works if "Table_View" is a table or a view. There are no "parameters" that
you can specify for a view. If you want to have a query change based on
user input, I'd have to point you to stored procedures.
Scott
"gmead7" <gmead7@.discussions.microsoft.com> wrote in message
news:E6793343-5F16-4194-89D3-3A78F346971C@.microsoft.com...
>I am migrating a database from Access to SQL Server 2000. In Access, I had
> several Parameter Queries set up so that users could specify a parameter
> based on their need. I combed through Books on Line and figured out how
> to
> do it in Query Designer. Is there a way to save this query with the set
> up
> parameters into a view so that I can have other users re-use it?
> thank you
Showing posts with label specify. Show all posts
Showing posts with label specify. Show all posts
Friday, March 30, 2012
Parameter Queries
I am migrating a database from Access to SQL Server 2000. In Access, I had
several Parameter Queries set up so that users could specify a parameter
based on their need. I combed through Books on Line and figured out how to
do it in Query Designer. Is there a way to save this query with the set up
parameters into a view so that I can have other users re-use it?
thank youSee "Inline User-Defined Functions" in BOL.
AMB
"gmead7" wrote:
> I am migrating a database from Access to SQL Server 2000. In Access, I had
> several Parameter Queries set up so that users could specify a parameter
> based on their need. I combed through Books on Line and figured out how to
> do it in Query Designer. Is there a way to save this query with the set up
> parameters into a view so that I can have other users re-use it?
> thank you|||A view acts like a table in SQL Server. E.G. "Select * from Table_View"
works if "Table_View" is a table or a view. There are no "parameters" that
you can specify for a view. If you want to have a query change based on
user input, I'd have to point you to stored procedures.
Scott
"gmead7" <gmead7@.discussions.microsoft.com> wrote in message
news:E6793343-5F16-4194-89D3-3A78F346971C@.microsoft.com...
>I am migrating a database from Access to SQL Server 2000. In Access, I had
> several Parameter Queries set up so that users could specify a parameter
> based on their need. I combed through Books on Line and figured out how
> to
> do it in Query Designer. Is there a way to save this query with the set
> up
> parameters into a view so that I can have other users re-use it?
> thank you
several Parameter Queries set up so that users could specify a parameter
based on their need. I combed through Books on Line and figured out how to
do it in Query Designer. Is there a way to save this query with the set up
parameters into a view so that I can have other users re-use it?
thank youSee "Inline User-Defined Functions" in BOL.
AMB
"gmead7" wrote:
> I am migrating a database from Access to SQL Server 2000. In Access, I had
> several Parameter Queries set up so that users could specify a parameter
> based on their need. I combed through Books on Line and figured out how to
> do it in Query Designer. Is there a way to save this query with the set up
> parameters into a view so that I can have other users re-use it?
> thank you|||A view acts like a table in SQL Server. E.G. "Select * from Table_View"
works if "Table_View" is a table or a view. There are no "parameters" that
you can specify for a view. If you want to have a query change based on
user input, I'd have to point you to stored procedures.
Scott
"gmead7" <gmead7@.discussions.microsoft.com> wrote in message
news:E6793343-5F16-4194-89D3-3A78F346971C@.microsoft.com...
>I am migrating a database from Access to SQL Server 2000. In Access, I had
> several Parameter Queries set up so that users could specify a parameter
> based on their need. I combed through Books on Line and figured out how
> to
> do it in Query Designer. Is there a way to save this query with the set
> up
> parameters into a view so that I can have other users re-use it?
> thank you
Parameter Queries
I am migrating a database from Access to SQL Server 2000. In Access, I had
several Parameter Queries set up so that users could specify a parameter
based on their need. I combed through Books on Line and figured out how to
do it in Query Designer. Is there a way to save this query with the set up
parameters into a view so that I can have other users re-use it?
thank youSee "Inline User-Defined Functions" in BOL.
AMB
"gmead7" wrote:
> I am migrating a database from Access to SQL Server 2000. In Access, I ha
d
> several Parameter Queries set up so that users could specify a parameter
> based on their need. I combed through Books on Line and figured out how t
o
> do it in Query Designer. Is there a way to save this query with the set u
p
> parameters into a view so that I can have other users re-use it?
> thank you|||A view acts like a table in SQL Server. E.G. "Select * from Table_View"
works if "Table_View" is a table or a view. There are no "parameters" that
you can specify for a view. If you want to have a query change based on
user input, I'd have to point you to stored procedures.
Scott
"gmead7" <gmead7@.discussions.microsoft.com> wrote in message
news:E6793343-5F16-4194-89D3-3A78F346971C@.microsoft.com...
>I am migrating a database from Access to SQL Server 2000. In Access, I had
> several Parameter Queries set up so that users could specify a parameter
> based on their need. I combed through Books on Line and figured out how
> to
> do it in Query Designer. Is there a way to save this query with the set
> up
> parameters into a view so that I can have other users re-use it?
> thank yousql
several Parameter Queries set up so that users could specify a parameter
based on their need. I combed through Books on Line and figured out how to
do it in Query Designer. Is there a way to save this query with the set up
parameters into a view so that I can have other users re-use it?
thank youSee "Inline User-Defined Functions" in BOL.
AMB
"gmead7" wrote:
> I am migrating a database from Access to SQL Server 2000. In Access, I ha
d
> several Parameter Queries set up so that users could specify a parameter
> based on their need. I combed through Books on Line and figured out how t
o
> do it in Query Designer. Is there a way to save this query with the set u
p
> parameters into a view so that I can have other users re-use it?
> thank you|||A view acts like a table in SQL Server. E.G. "Select * from Table_View"
works if "Table_View" is a table or a view. There are no "parameters" that
you can specify for a view. If you want to have a query change based on
user input, I'd have to point you to stored procedures.
Scott
"gmead7" <gmead7@.discussions.microsoft.com> wrote in message
news:E6793343-5F16-4194-89D3-3A78F346971C@.microsoft.com...
>I am migrating a database from Access to SQL Server 2000. In Access, I had
> several Parameter Queries set up so that users could specify a parameter
> based on their need. I combed through Books on Line and figured out how
> to
> do it in Query Designer. Is there a way to save this query with the set
> up
> parameters into a view so that I can have other users re-use it?
> thank yousql
Wednesday, March 28, 2012
Parameter Layout: Any way to specify this in report designer?
Hi,
I am designing a report with 12 parameters in 4 groups that I would
like to layout in groups of 3 parameters. I cannot find any way to
specify a layout (other than the order, which makes it confusing for
the user.
Does anyone know if there is a way to do this or if it is something
that is planned for a future version?
Many thanks
PatrickHi, Patrick
Unfortunately, the Report Server doesn't offer much control of the
parameter toolbar, except for the order in which you display your
paremeters, and whether or not to display the parameter toolbar.
If you really need to create such layout, I would recommend creating an
ASP.NET web application with an aspx page that lays out your parameters
using web controls, then you can gather the input from the user in the
postback, and create your URL to the report server, or use the SOAP API
and call the Render() method passing those params in and return the
byte[] of the rendered report in the specified format.
I know this is probably not what you wanted to hear, but people do this
all the time and you can find tons of samples onn the web.
Regards,
Thiago Silva, MCAD.NET
On Nov 22, 6:06 pm, pfisc...@.hotmail.co.uk wrote:
> Hi,
> I am designing a report with 12 parameters in 4 groups that I would
> like to layout in groups of 3 parameters. I cannot find any way to
> specify a layout (other than the order, which makes it confusing for
> the user.
> Does anyone know if there is a way to do this or if it is something
> that is planned for a future version?
> Many thanks
> Patrick|||Hi Thiago,
You got it :( - BUT thanks very much for confirming this as I know I
have not missed something that I would kick myself for!
...The thing is, it is so easy to use as it stands and that is the
beauty of it I think. It's just that much more effort to code it -> but
again thanks for the tip on samples for this - clearly others have had
a similar experience. Fingers crossed it will be improved in a future
version.
cheers Patrick
tafs7 wrote:
> Hi, Patrick
> Unfortunately, the Report Server doesn't offer much control of the
> parameter toolbar, except for the order in which you display your
> paremeters, and whether or not to display the parameter toolbar.
> If you really need to create such layout, I would recommend creating an
> ASP.NET web application with an aspx page that lays out your parameters
> using web controls, then you can gather the input from the user in the
> postback, and create your URL to the report server, or use the SOAP API
> and call the Render() method passing those params in and return the
> byte[] of the rendered report in the specified format.
> I know this is probably not what you wanted to hear, but people do this
> all the time and you can find tons of samples onn the web.
> Regards,
> Thiago Silva, MCAD.NET
> On Nov 22, 6:06 pm, pfisc...@.hotmail.co.uk wrote:
> > Hi,
> >
> > I am designing a report with 12 parameters in 4 groups that I would
> > like to layout in groups of 3 parameters. I cannot find any way to
> > specify a layout (other than the order, which makes it confusing for
> > the user.
> >
> > Does anyone know if there is a way to do this or if it is something
> > that is planned for a future version?
> >
> > Many thanks
> >
> > Patrick
I am designing a report with 12 parameters in 4 groups that I would
like to layout in groups of 3 parameters. I cannot find any way to
specify a layout (other than the order, which makes it confusing for
the user.
Does anyone know if there is a way to do this or if it is something
that is planned for a future version?
Many thanks
PatrickHi, Patrick
Unfortunately, the Report Server doesn't offer much control of the
parameter toolbar, except for the order in which you display your
paremeters, and whether or not to display the parameter toolbar.
If you really need to create such layout, I would recommend creating an
ASP.NET web application with an aspx page that lays out your parameters
using web controls, then you can gather the input from the user in the
postback, and create your URL to the report server, or use the SOAP API
and call the Render() method passing those params in and return the
byte[] of the rendered report in the specified format.
I know this is probably not what you wanted to hear, but people do this
all the time and you can find tons of samples onn the web.
Regards,
Thiago Silva, MCAD.NET
On Nov 22, 6:06 pm, pfisc...@.hotmail.co.uk wrote:
> Hi,
> I am designing a report with 12 parameters in 4 groups that I would
> like to layout in groups of 3 parameters. I cannot find any way to
> specify a layout (other than the order, which makes it confusing for
> the user.
> Does anyone know if there is a way to do this or if it is something
> that is planned for a future version?
> Many thanks
> Patrick|||Hi Thiago,
You got it :( - BUT thanks very much for confirming this as I know I
have not missed something that I would kick myself for!
...The thing is, it is so easy to use as it stands and that is the
beauty of it I think. It's just that much more effort to code it -> but
again thanks for the tip on samples for this - clearly others have had
a similar experience. Fingers crossed it will be improved in a future
version.
cheers Patrick
tafs7 wrote:
> Hi, Patrick
> Unfortunately, the Report Server doesn't offer much control of the
> parameter toolbar, except for the order in which you display your
> paremeters, and whether or not to display the parameter toolbar.
> If you really need to create such layout, I would recommend creating an
> ASP.NET web application with an aspx page that lays out your parameters
> using web controls, then you can gather the input from the user in the
> postback, and create your URL to the report server, or use the SOAP API
> and call the Render() method passing those params in and return the
> byte[] of the rendered report in the specified format.
> I know this is probably not what you wanted to hear, but people do this
> all the time and you can find tons of samples onn the web.
> Regards,
> Thiago Silva, MCAD.NET
> On Nov 22, 6:06 pm, pfisc...@.hotmail.co.uk wrote:
> > Hi,
> >
> > I am designing a report with 12 parameters in 4 groups that I would
> > like to layout in groups of 3 parameters. I cannot find any way to
> > specify a layout (other than the order, which makes it confusing for
> > the user.
> >
> > Does anyone know if there is a way to do this or if it is something
> > that is planned for a future version?
> >
> > Many thanks
> >
> > Patrick
Monday, March 26, 2012
Parameter direction of a stored procedure
I am using the MS SQL Server Management Studio Express to create a stored procedure in one of my databases. I specify one of the parameters as OUTPUT as follows:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[ProcRetDbl]
@.Threshold real, @.Result real OUTPUT
AS
BEGIN
SET NOCOUNT ON;
SELECT @.Result = Channel1 FROM DataTable WHERE Channel2 < @.Threshold
END
But then when I look at the properties of the @.Result parameter in the Object Explorer's tree, it is shown as "Input/Output". Now, this seems like no problem at all since it will work fine as output, even though I don't need it to be able to do input as well, but I'm wondering why that is happening.
I am using ADO.Net on the other end to execute the procedure and I need to decide what parameter type to set to the SqlParameter object: "Output" or "InputOutput". I'm sure I can sort this out but I usually like to know what I'm doing. Thanks for the help.
KamenYou are probably thinking too hard :)
You need to supply a parameter in to give you something to read when the value comes out. I can't remember what I use for sqlParameters - probably inputoutput. Try both - what have you got to lose?|||The only pure output from a stored procedure is the return code value and any result sets. Procedure parameters must be input, and can optionally be output too.
-PatP
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[ProcRetDbl]
@.Threshold real, @.Result real OUTPUT
AS
BEGIN
SET NOCOUNT ON;
SELECT @.Result = Channel1 FROM DataTable WHERE Channel2 < @.Threshold
END
But then when I look at the properties of the @.Result parameter in the Object Explorer's tree, it is shown as "Input/Output". Now, this seems like no problem at all since it will work fine as output, even though I don't need it to be able to do input as well, but I'm wondering why that is happening.
I am using ADO.Net on the other end to execute the procedure and I need to decide what parameter type to set to the SqlParameter object: "Output" or "InputOutput". I'm sure I can sort this out but I usually like to know what I'm doing. Thanks for the help.
KamenYou are probably thinking too hard :)
You need to supply a parameter in to give you something to read when the value comes out. I can't remember what I use for sqlParameters - probably inputoutput. Try both - what have you got to lose?|||The only pure output from a stored procedure is the return code value and any result sets. Procedure parameters must be input, and can optionally be output too.
-PatP
Subscribe to:
Posts (Atom)