Viewing 15 posts - 151 through 165 (of 167 total)
Result with DENSE_RANK () in my code is the same as with ROW_NUMBER()
October 11, 2011 at 12:29 pm
It should belong to the same group. I just was not sure on null values behaviour in the ranking function.
Thanks!
October 11, 2011 at 12:15 pm
Actually after some experimenting I am convinced that null-containing records ARE included in the result set
October 11, 2011 at 12:10 pm
And (out of the topic!) how to place the code into that nice lookink box as you do?
October 11, 2011 at 12:07 pm
I need this record (with null in the field) to be included.
October 11, 2011 at 12:03 pm
Not exactly. I need to get rid of duplicates in the existing table. I am using four fileds in the partition by list. One of these fields in some records...
October 11, 2011 at 11:57 am
Division by zero should be ERROR, not null. How come?
January 28, 2011 at 6:13 am
Thanks David,
I'll certainly take a look on 'injections'
January 26, 2010 at 11:28 am
Thanks Roy,
I rewrote the proc:
====================================
ALTER PROCEDURE [dbo].[sp_InsertFromSubformTryCatch]
@tblName nvarchar (50),
@CaseID int
AS
BEGIN try
Declare @SqlString nvarchar(100),@tcount int
begin transaction
SET NOCOUNT ON
set xact_abort on
--=== First we need to delete records from the main...
January 26, 2010 at 11:27 am
Thanks, parentheses worked! Now - another problem:
1) This is the procedure:
===================================
alter PROCEDURE [dbo].[sp_InsertFromSubform]
@tblName nvarchar (50),
@CaseID int
AS
begin transaction
SET NOCOUNT ON;
Declare @SqlString nvarchar(100)
--set @tblName=@tblName
select @SqlString='Delete ' + @tblName + '...
January 25, 2010 at 11:54 am
Thank you Matt.
This code worked perfectly well: the error record was written into the Error Log table, and catch print message did not show up. So ... what's now?
November 23, 2009 at 2:04 pm
Thanks. I'll try this one. But look, if I run this procedure:
=================
ALTER Proc [dbo].[sp_ErrorTest]
as
begin try
select 1/0
end try
begin catch
exec sp_SqlInsertError
end catch
==========================
the sp_SqlInsertError works OK, e.g. inserts a row into ErrorLog table.
November 23, 2009 at 9:59 am
Viewing 15 posts - 151 through 165 (of 167 total)