Showing posts with label equivalent. Show all posts
Showing posts with label equivalent. Show all posts

Sunday, March 11, 2012

"Session" values

Is it possible to have the equivalent of a session value? What I'm wanting
to do is get the user to choose a value (item center) on the home page and
use that value to filter all the reports. Then if he wants to see the
reports for a different item center, he must go back to the home page and
choose a different one.
Even better, display the same list of item centers as a filter option at the
top of each report and default it to the currently chosen item center.
Any ideas on how to do this? I saw a post where someone asked if it was
possible to create a global variable to use throughout all reports and noone
answered him. So I'm assuming that it can't be done. But I'm asking anyhow.
Thanks
ToddTodd,
If you create your own web application, you can certainly keep track of some
value and pass it to your reports as one of the parameters. AFAIK, there is
no built-in functionality in the ReportServer or Report Manager web apps.
Ted
"Todd Bright" wrote:
> Is it possible to have the equivalent of a session value? What I'm wanting
> to do is get the user to choose a value (item center) on the home page and
> use that value to filter all the reports. Then if he wants to see the
> reports for a different item center, he must go back to the home page and
> choose a different one.
> Even better, display the same list of item centers as a filter option at the
> top of each report and default it to the currently chosen item center.
> Any ideas on how to do this? I saw a post where someone asked if it was
> possible to create a global variable to use throughout all reports and noone
> answered him. So I'm assuming that it can't be done. But I'm asking anyhow.
> Thanks
> Todd|||So basically each report is just a standalone report, right?
"Ted K" wrote:
> Todd,
> If you create your own web application, you can certainly keep track of some
> value and pass it to your reports as one of the parameters. AFAIK, there is
> no built-in functionality in the ReportServer or Report Manager web apps.
> Ted
> "Todd Bright" wrote:
> > Is it possible to have the equivalent of a session value? What I'm wanting
> > to do is get the user to choose a value (item center) on the home page and
> > use that value to filter all the reports. Then if he wants to see the
> > reports for a different item center, he must go back to the home page and
> > choose a different one.
> >
> > Even better, display the same list of item centers as a filter option at the
> > top of each report and default it to the currently chosen item center.
> >
> > Any ideas on how to do this? I saw a post where someone asked if it was
> > possible to create a global variable to use throughout all reports and noone
> > answered him. So I'm assuming that it can't be done. But I'm asking anyhow.
> >
> > Thanks
> > Todd

Friday, February 24, 2012

"Linked Table" from a .txt file in SQL Server?

OKay, I'm really, really good with MS Access, but am just getting up to speed
on SQL Server. Is there a SQL Server equivalent of linking (not importing) a
table from a .txt file?
Thanks!
Something similar would be to create a linked server to
access the text file. You use the Jet provider and set the
data source to the directory which has the text files you
want to access.
EXEC sp_addlinkedserver @.server ='TextLinkServer',
@.srvproduct='',
@.provider ='Microsoft.Jet.OLEDB.4.0',
@.datasrc='D:\',
@.provstr='Text'
You could then get a list of all text files in the directory
if you execute:
EXEC sp_tables_ex 'TextLinkServer'
You can access the files as listed in the directory. Use the
table_name listed when you execute sp_tables_ex which is the
text file name.
select *
from TextLinkServer...[YourFile#txt]
to access D:\YourFile.txt
-Sue
On Wed, 6 Apr 2005 16:05:04 -0700, "Joel"
<Joel@.discussions.microsoft.com> wrote:

>OKay, I'm really, really good with MS Access, but am just getting up to speed
>on SQL Server. Is there a SQL Server equivalent of linking (not importing) a
>table from a .txt file?
>Thanks!
|||Almost there...
The only other thing is that I'm trying to use a text file that exports from
SAP, which wants to export to the 'C:\Documents and
Settings\USERNAME\SapWorkDir' directory. When specifying a datasource, is
there a way to use a variable to put in the currently logged on user in place
of USERNAME?
Thanks!
"Sue Hoegemeier" wrote:

> Something similar would be to create a linked server to
> access the text file. You use the Jet provider and set the
> data source to the directory which has the text files you
> want to access.
> EXEC sp_addlinkedserver @.server ='TextLinkServer',
> @.srvproduct='',
> @.provider ='Microsoft.Jet.OLEDB.4.0',
> @.datasrc='D:\',
> @.provstr='Text'
> You could then get a list of all text files in the directory
> if you execute:
> EXEC sp_tables_ex 'TextLinkServer'
> You can access the files as listed in the directory. Use the
> table_name listed when you execute sp_tables_ex which is the
> text file name.
> select *
> from TextLinkServer...[YourFile#txt]
> to access D:\YourFile.txt
> -Sue
> On Wed, 6 Apr 2005 16:05:04 -0700, "Joel"
> <Joel@.discussions.microsoft.com> wrote:
>
>
|||If the data source is always changing and varies from user
to user, you may want to look at using Openrowset instead.
-Sue
On Thu, 7 Apr 2005 07:33:05 -0700, "Joel"
<Joel@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Almost there...
>The only other thing is that I'm trying to use a text file that exports from
>SAP, which wants to export to the 'C:\Documents and
>Settings\USERNAME\SapWorkDir' directory. When specifying a datasource, is
>there a way to use a variable to put in the currently logged on user in place
>of USERNAME?
>Thanks!
>"Sue Hoegemeier" wrote:

"Linked Table" from a .txt file in SQL Server?

OKay, I'm really, really good with MS Access, but am just getting up to spee
d
on SQL Server. Is there a SQL Server equivalent of linking (not importing) a
table from a .txt file?
Thanks!Something similar would be to create a linked server to
access the text file. You use the Jet provider and set the
data source to the directory which has the text files you
want to access.
EXEC sp_addlinkedserver @.server ='TextLinkServer',
@.srvproduct='',
@.provider ='Microsoft.Jet.OLEDB.4.0',
@.datasrc='D:',
@.provstr='Text'
You could then get a list of all text files in the directory
if you execute:
EXEC sp_tables_ex 'TextLinkServer'
You can access the files as listed in the directory. Use the
table_name listed when you execute sp_tables_ex which is the
text file name.
select *
from TextLinkServer...[YourFile#txt]
to access D:\YourFile.txt
-Sue
On Wed, 6 Apr 2005 16:05:04 -0700, "Joel"
<Joel@.discussions.microsoft.com> wrote:

>OKay, I'm really, really good with MS Access, but am just getting up to spe
ed
>on SQL Server. Is there a SQL Server equivalent of linking (not importing)
a
>table from a .txt file?
>Thanks!|||Almost there...
The only other thing is that I'm trying to use a text file that exports from
SAP, which wants to export to the 'C:\Documents and
Settings\USERNAME\SapWorkDir' directory. When specifying a datasource, is
there a way to use a variable to put in the currently logged on user in plac
e
of USERNAME?
Thanks!
"Sue Hoegemeier" wrote:

> Something similar would be to create a linked server to
> access the text file. You use the Jet provider and set the
> data source to the directory which has the text files you
> want to access.
> EXEC sp_addlinkedserver @.server ='TextLinkServer',
> @.srvproduct='',
> @.provider ='Microsoft.Jet.OLEDB.4.0',
> @.datasrc='D:',
> @.provstr='Text'
> You could then get a list of all text files in the directory
> if you execute:
> EXEC sp_tables_ex 'TextLinkServer'
> You can access the files as listed in the directory. Use the
> table_name listed when you execute sp_tables_ex which is the
> text file name.
> select *
> from TextLinkServer...[YourFile#txt]
> to access D:\YourFile.txt
> -Sue
> On Wed, 6 Apr 2005 16:05:04 -0700, "Joel"
> <Joel@.discussions.microsoft.com> wrote:
>
>|||If the data source is always changing and varies from user
to user, you may want to look at using Openrowset instead.
-Sue
On Thu, 7 Apr 2005 07:33:05 -0700, "Joel"
<Joel@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Almost there...
>The only other thing is that I'm trying to use a text file that exports fro
m
>SAP, which wants to export to the 'C:\Documents and
>Settings\USERNAME\SapWorkDir' directory. When specifying a datasource, is
>there a way to use a variable to put in the currently logged on user in pla
ce
>of USERNAME?
>Thanks!
>"Sue Hoegemeier" wrote:
>

"Limit to List" equivalent in SQL

In Access, I can limit field options to a list. What is the equivalent in SQL 2005?use a lookup table and enforce referential integrity.|||well, if it's a limited set, with ~0 likelihood of needing to be updated, you can also use a CHECK constraint

for examplecreate table foo
( ...
, gender char(1) null check (coalesce(gender,'M') in ('M','F'))
... )