Viewing 15 posts - 5,446 through 5,460 (of 7,499 total)
--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
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
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...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
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...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
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)
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
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...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
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,...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
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
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 23, 2007 at 8:04 am
Check out BOL for
DBCC SHRINKFILE
(
{ 'file_name' | file_id }
{ [ , EMPTYFILE ]
| [...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
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...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
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...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 19, 2007 at 9:13 am
Now that's a very welcome feedback :Wow:
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 19, 2007 at 6:55 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:
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
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...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 15, 2007 at 12:01 am
by default userid's are not case sensitive, passwords are !
Are you sure you're trying to connect to the correct server (your own SS2005Express)
If you can provide a servername, try .\SQLExpress
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 14, 2007 at 4:10 am
mrroofer (11/13/2007)
USE [master]GO
...CREATE USER [markr] FOR LOGIN [mroney] ...
this is wrong, it should be twice [markr]
it should be
USE [master]
GO
--CREATE LOGIN [markr] WITH PASSWORD=N'roof1920', DEFAULT_DATABASE=[Roofing 92]
GO
USE [Roofing 92]
GO
drop user [markr]
go
CREATE USER...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 14, 2007 at 1:28 am
Viewing 15 posts - 5,446 through 5,460 (of 7,499 total)