all groups > sql server programming > october 2004 > threads for saturday october 16
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Joins
Posted by Rajan at 10/16/2004 10:52:16 PM
Hi Friends,
=20
I need your help to write this query.
=20
I have two tables tMember & tFavorites.
=20
Data:
Member A has 3 favorites P, Q & R.
Member B & C have no favorites.
=20
Stored Procedure:
CREATE PROCEDURE sp_SearchResults
(
@favorites_only char... more >>
ISQL, query to text File : How to remove last <CR> ??
Posted by tristant at 10/16/2004 9:15:13 PM
Hi all,
I am using ISQL to query and put the result into Text file, then uploaded by
another system. The statement is :
isql -Umyid -Pmypwd -Smyserver -dmydb -h-1 -Q"Set nocount ON Select code,
name from table1" -otest.doc
It Works, BUT there is always additional line caused by last carri... more >>
Function that returns table with dynamic code
Posted by OK at 10/16/2004 8:29:17 PM
I'm trying to create a function that returns a table using dynamic
code (i.e. I want to build a SQL statement and then execute that SQL
statement to fill the table). Of course, the obvious way to do that
is with an EXEC command but SQL Server functions don't support EXEC.
Does anyone know a way... more >>
Passing table type variables to SP
Posted by Agoston Bejo at 10/16/2004 7:55:20 PM
I would like to write a stored procedure that takes a table (i.e. table
variable) as its parameter.
E.g.:
DECLARE @mytable = TABLE(ID INT, NAME VARCHAR(50))
SP_MYPROC @mytable
What should SP_MYPROC's signature look like? I can't seem to be able to find
anything about this in the documenati... more >>
covering indexes
Posted by Sri at 10/16/2004 6:33:06 PM
In lot of atricles regarding sql server performacne i read about "consider
using covering indexes" .
my question is How do u create a covering index, can we create it explicitly
or
sql server creates it automatically?
Thanks
Sri
... more >>
INSERT INTO and Trigger
Posted by grade11 at 10/16/2004 5:05:51 PM
hello,
I have an Insert Into that inserts 2 or more rows into a
table. This table has a trigger that fires when inserted...
For some reason... the trigger fired only once even though
i inserted 2 rows..
How do I make sure that the trigger fires for both rows
Thanks... more >>
error validating formula but it works anyway
Posted by Bob at 10/16/2004 4:32:04 PM
EM accepts this fomula to calculate the contents of a column, and it gives
good data, but EM still complains "Error validating the formula 'FileName' /
Do you want to edit the formula?":
(convert(varchar(256),replace(right([FileNameAndPath],(charindex('\',reverse
([FileNameAndPath])) - 1)),'.t... more >>
Change owner of SP
Posted by Mark at 10/16/2004 1:30:49 PM
Hi - I'm moveing hosts and creating copies of my DB - I can change the
owner of tables using:
sp_msforeachtable "sp_changeobjectowner '?', 'dbo'"
How do I change the owner of an SP?
Thanks, Mark
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Passing parameters between job steps
Posted by Mark Butler at 10/16/2004 1:09:30 PM
Is there an easy way to pass parameters between job steps? I have an
extract that creates a text file in step 1 of a job. Step 2 needs the name
of this file and act upon it. I need a way to be able to pass the name of
the file to the second step.
Secondly is there a way to pass return codes... more >>
having SQL or Frontpage send a Popup or message to a workstation to say a new record is created?
Posted by Dennis Burgess at 10/16/2004 9:40:47 AM
Error in this sp whith SP_EXECUTESQL
Posted by newsgroup NO[at]SPAM dragic.com at 10/16/2004 8:15:25 AM
I hawe a error that I can't fix. I have tryed many things but I have
not found a solution.
My sp is like this:
CREATE PROCEDURE GetPower
@WhereStatement nvarchar(4000) = null
as
declare @ExecSQL nvarchar(4000)
SET @ExecSQL = '
Select Car,
CASE WHEN (HP = NULL) T... more >>
Very simple SELECT stored procedure permission denied error
Posted by dotnw NO[at]SPAM hotmail.com at 10/16/2004 7:12:47 AM
Hello,
I can't get this very simple stored procedure to execute from within
my ASP.NET application:
SELECT * into MyTempTable from MyTable
The error returned is
CREATE TABLE permission denied in database 'MyTable'.
I've tried setting lots of permission settings that I can see inside... more >>
Linked server
Posted by Geoff Person at 10/16/2004 7:05:01 AM
I'm using a linked server with oledb odbc connection to connect to Peoplesoft
tables. I can see all the tables but when I query them using Query Analyzer,
I only see two records no matter which table I query.
Thanks,
Geoff... more >>
Linked Servers
Posted by Geoff Person at 10/16/2004 6:59:02 AM
I'm attempting to add a linked server via the OLE ODBC connection. It seems
to have worked because I can see the tables. When I run a query using Query
Anaylzer, I only get back two records no matter what table I query.
Any advice?
Thanks... more >>
|