Viewing 15 posts - 5,446 through 5,460 (of 7,502 total)
it is actualy getting the resultset as well as the rowcount because that is returned as an outputvariable.
.
November 26, 2007 at 12:25 pm
- problem with authshrink is that you don't know _when_ it is going to happen.
- autoshrink is active, and apps are still accessing the db, they will suffer, or even...
November 26, 2007 at 12:22 pm
--Lets create SP1
CREATE PROC SP1
@NoRows int OUTPUT
AS
begin
set nocount on -- avoid unneeded network info
SELECT au_lname
FROM authors
SET @NoRows = @@rowcount
end
go
declare @Rowcount int
exec sp1 @Rowcount output
print @Rowcount
November 26, 2007 at 10:46 am
there was no problem with the proc.
using Return @Exists just means that you use the value of var @Exists as procedure-return-code.
DECLARE @rc int
DECLARE @pUsername nvarchar(50)
DECLARE @Exists bit
-- TODO: Set parameter...
November 26, 2007 at 5:35 am
Ahmed Bouzamondo (11/24/2007)
If I want to create the user JustProc on AdVentureWorks datatbase.
Please Just confirm the following:
1. Connect to an instance as the sysadmin
2. Create a new login JustProc...
November 25, 2007 at 10:31 am
http://www.sqlservercentral.com/scripts/Miscellaneous/31639/
The order of adding the parameters to the cmdobject is important ! (= order of parameters as used with the create procedure)
November 25, 2007 at 4:56 am
just add the login to your db (public) and then
you can grant it exec on schema.
This way _all_ schema bound functions and procedures are available for the login.
Also keep...
November 24, 2007 at 2:49 am
no, that is not needed.
in stead of the "set transaction isolation level" you
might use the "with (nolock)" table hint if you don't want
the scope to be proc level.
Anyways,...
November 23, 2007 at 8:09 am
or if you only want to trim leading or trailing spaces you can use :
SELECT RTRIM(LTRIM(mycol))
FROM myobject
November 23, 2007 at 8:04 am
Check out BOL for
DBCC SHRINKFILE
(
{ 'file_name' | file_id }
{ [ , EMPTYFILE ]
| [...
November 22, 2007 at 9:19 am
easiest way is to
select top 1 convert(varchar(23),datetimecolumn,121) as datetimestring
from yourtable
and copy/paste the result.
or use
Declare @wrkDatetime datetime
set @wrkDatetime = dateadd(d, -10, getdate()) -- today - 10 days
select...
November 19, 2007 at 9:17 am
Indeed within a sqlserver version (sql2005) you can move datafiles from 64bit to 32bit and visa versa.
keep in mind, once mounted on sql2005 you cannot detatch and attach
on sql2000...
November 19, 2007 at 9:13 am
You've got the solution.
Just a reminder there are some downsides for using dynamic sql
All time ref: http://www.sommarskog.se/dynamic_sql.html :Whistling:
November 16, 2007 at 4:55 am
Because you are apparently using integrated security,
I'm beginning to thing you application also has its own usermanagement. i.e. users stored in some table in your db. That may be the...
November 15, 2007 at 12:01 am
Viewing 15 posts - 5,446 through 5,460 (of 7,502 total)