473,379 Members | 1,263 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

VIEWs visibility scope

We're working on a new release of a software.
In the existing version, each client connects and executes a long batch of
analysis on some tables.

In the new release, we need to allow each client to execute analysis on a
subset of data, according to certain login information.

Our idea is:
1) Connection to db
2) Creation of one View according to restrictions
3) Execution of analysis using just created view and some tables.

The problem is that executing
create view myvista as
select * from tb_data where testo='A1'
from two different clients, creates just one view.

Question: Does it exist a way of creating a VIEW with a connection scope,
something like 'select into ##temptable'?

We tried Create View #MyVista or ##Myvista, but this name is not accepted.

Alternative way, is creating a ##TempTable, at the beginning of the batch,
and using it as data source instead of full table, but, due to really huge
amount of data, this could really disturb server performances.

Thanks for any help

Alberto
Jul 20 '05 #1
2 2128
Hi

I wouldhope that the same view could be used by each user if you chose the
restriction correctly. Maybe joining to your users table or use of the
IS_MEMBER function will facilitate this.

John

"Albe V" <va*****************@hotmail.com> wrote in message
news:sg**********************@twister1.libero.it.. .
We're working on a new release of a software.
In the existing version, each client connects and executes a long batch of
analysis on some tables.

In the new release, we need to allow each client to execute analysis on a
subset of data, according to certain login information.

Our idea is:
1) Connection to db
2) Creation of one View according to restrictions
3) Execution of analysis using just created view and some tables.

The problem is that executing
create view myvista as
select * from tb_data where testo='A1'
from two different clients, creates just one view.

Question: Does it exist a way of creating a VIEW with a connection scope,
something like 'select into ##temptable'?

We tried Create View #MyVista or ##Myvista, but this name is not accepted.

Alternative way, is creating a ##TempTable, at the beginning of the batch,
and using it as data source instead of full table, but, due to really huge
amount of data, this could really disturb server performances.

Thanks for any help

Alberto

Jul 20 '05 #2
Albe V (va*****************@hotmail.com) writes:
Our idea is:
1) Connection to db
2) Creation of one View according to restrictions
3) Execution of analysis using just created view and some tables.

The problem is that executing
create view myvista as
select * from tb_data where testo='A1'
from two different clients, creates just one view.

Question: Does it exist a way of creating a VIEW with a connection scope,
something like 'select into ##temptable'?


No.

And in any case, if the user is going to create a view, he needs to
have permissions he should not have.

The normal way of doing this is to have a view like:

SELECT * FROM tbl WHERE userid = SYSTEM_USER

Another possibility is to use a table-valued function instead, as this
permits you to pass parameters.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Sue | last post by:
I wrote a script that uses the sp_refreshviews. The script will be part of a larger one that is automatically run in multiple databases where different views exist. Question: My understanding...
8
by: TTroy | last post by:
I have a few questions about "scope" and "visibility," which seem like two different things. To me "visibility" of the name of a function or object is the actual code that can use it in an...
14
by: rahul8143 | last post by:
hello, To limit scope of a variable in a single file that is part of a large project that have several C files we use static variable right?then to limit any variable to function scope it should...
0
by: - vhannak | last post by:
I have Visual Studio C# app where the main form keeps a log of the application's status. For several of the event handlers and methods in the main form, I have try/catch blocks. But adding...
224
by: VB6 User | last post by:
Hi all devies! Many (.NUT, .NOT or whatever), APIs, VB6, Views & Questions Your can not call APIs directly in .NET, only via P/Invoke. There are some things that cannot be done in...
6
by: jhullu | last post by:
Hi all I'm lookup for a documentation or explanation abour the visibility and syntax about class. I found the ECMAScript Language Spec. 3 (final) & 4 (draft) but it's not very easy to read...
1
by: Steven T. Hatton | last post by:
All of the following terms are used in some way to describe where and how a name is relevant to a particular location in a program: visible, declarative region, scope, potential scope, valid,...
2
by: Jamey Bon | last post by:
I am a C# newbie. I am having a tough time with several issues of scope and visibility. In short, why can't I see any of the elements of Form1 (the base form generated by the "Windows...
7
by: Gary | last post by:
Hello guys! Bear with me, I am a newbie. She is the Data Warehouse manager. She has about 50 users to use the Oracle database from M$ Access via ODBC connection. All those users have only...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.