Viewing 15 posts - 16 through 30 (of 46 total)
If your pretty sure this procedure is not needed anymore and it is a security risk, you probably should drop it:
DROP PROCEDURE [ProcedureName]
September 18, 2009 at 11:59 pm
If your calls to this procedure can be asynchronous, I recommend using the service broker. The broker will monitor the processing of the procedure (assuming it's been called by...
September 18, 2009 at 3:19 am
By the way, if your data is more than 1 level deep, then a recursive join will be needed as Ben pointed out.
September 18, 2009 at 3:12 am
This query will yield the results you seek:
Select a.[Name], b.[Name]
FROM [YourTable] a
INNER JOIN [YourTable] b on a.categoryid = b.ParentCategoryID
September 18, 2009 at 3:09 am
I did realize that I can assign a default schema to a user, but what I was searching for was a statement that would allow me to change the default...
September 17, 2009 at 5:38 pm
This code results in the exact same result as yours, except it uses the coalesce function instead of a cursor:
create table #tblProject (
...
September 14, 2009 at 12:42 pm
Here's how you can do it:
begin try
declare @varchar varchar(100)
set @varchar = 1 + 'This will error out'
end try
begin catch
Declare @ERROR_MESSAGE varchar(max)
set @ERROR_MESSAGE = ERROR_MESSAGE()
RAISERROR(@ERROR_MESSAGE,11,1)
end catch
July 23, 2009 at 4:44 pm
Tim is correct that if your recovery mode is simple (which I believe is the default), you don't need to worry about clearing the log between transactions. If you...
July 21, 2009 at 9:55 am
Why would anyone think that INTERSECT is easier than INNER JOIN?
As mentioned above, for ad-hoc table comparison, these commands are indispensable and very easy. I setup my query like...
July 20, 2009 at 12:26 pm
Forgot to mentione, you will need to add the Plant and Plant Material columns in the #PrimaryKeyTable.
Also, you may want to use a table variable instead of temp table as...
July 20, 2009 at 12:15 pm
Here is a way to batch insert records. It is deffinately slower to insert records in this manner, but it can give your transaction log a break. Make...
July 20, 2009 at 12:11 pm
This is a limitation with SSRS that is quite frustrating. I once tried to find a color mapping that would show me what color in SSRS would equal the...
July 20, 2009 at 10:19 am
Very nice article. One clarrification, INTERSECT and EXCEPT are available in SQL 2005 (article refers only to 2008). I use these quite a bit in my 2005 env,...
July 20, 2009 at 9:31 am
Thanks for the reply Steve...I did weigh the option of giving security directly to the users as well. The above example was only the present need, but I wanted...
July 6, 2009 at 2:54 pm
I'm not sure how being less abstract will help as the solution should be able to apply to any security context.
But to answer your question, in this specific case, I...
July 6, 2009 at 2:18 pm
Viewing 15 posts - 16 through 30 (of 46 total)