Given a table defined like this:
MyTable
ItemID SubItemID SubItemValue
0 0 0
0 0 15
0 1 20
0 1 25
If I execute this self-join:
select t1.subItemID, t2.SubItemValue
from mytest t1, mytest t2
where t1.subitemid = 1 and...
Hi all.
I'm working on a set of sprocs to act as wrappers to our database and I want to create a new user/role to ONLY have EXECUTE privileges on these procedures.
Now, the procedures themselves are executing SELECT statments on other tables that the user does NOT have privileges to. This is...
I'm using VB and ADO to access my SQL Server 7 tables. The problem I'm running into is that one of my columns is of type TEXT. When I open the recordset on this table, all of the values in the text column are NULL, even when there is definitely data in that column.
Does anyone know what gives...
This may be hopeless, but what I want to do is essentially call a sproc 2 times, each time with different parameters, and then AND/OR the result sets.
What I'd love to do is this:
select * from table where id in
( sproc 'TX' union sproc 'CA' )
Any ideas at all?
After searching and reading and failing, I hope I can find help from the gurus.
Here's what I'm doing in a nutshell:
1. The basic form (copied from dev. guide) with two tabs (one for report design, one for preview).
2. I want to filter out the records that will show up in the report that the...
My project involves the CR 8.5 RDC and Visual Basic and I need to basically let users type in their own SQL queries and press a button and have a report come up that reflects that query.
My first stab was to just use the regular ODBC connection stuff ( Add the tables I want to the report...
I want to do this:
create procedure simple
@col char(40)
as
select * from @col
But that doesn't work. Can anyone help me find out how to pass a variable containing a column name and then use that variable in the select statement?
Thanks!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.