473,386 Members | 1,720 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,386 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 2129
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...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.