Viewing 15 posts - 61 through 75 (of 154 total)
almost there , but the implicit mode would not create 3 transactions , just one transaction - you need to commit the whole transaction just once..
Personally i use explicit transactions...
May 16, 2003 at 6:53 am
run this to disable a trigger
ALTER TABLE <TableName>
DISABLE TRIGGER <TriggerName>
and this to enable it
ALTER TABLE <TableName>
ENABLE TRIGGER <TriggerName>
August 23, 2002 at 3:13 am
how are you executing the procedure?!!
August 20, 2002 at 11:40 pm
are you sure this isnt behind a firewall?!!
August 13, 2002 at 1:11 am
use the IP<your ip>,SERVER PORT<1433> as the servername
August 12, 2002 at 11:49 pm
ok !! first of all i suggest you use a stored procedure to return your result set
however there is a way to return a serial number with a resultset ,...
August 7, 2002 at 12:57 am
try this
CREATE PROCEDURE Usp_ReturnRowCount(@SqlStr varchar(8000),
@RwCnt int OUTPUT)
AS
SET NOCOUNT ON
DECLARE@StrPosint
CREATE TABLE #Rslts
(
RwCntint
)
SET @StrPos = CHARINDEX ('FROM',@SqlStr)
SET @SqlStr = SUBSTRING(@SqlStr,@StrPos,LEN(@SqlStr))
SET @SqlStr = 'SELECT COUNT(*) ' + @SqlStr
INSERT INTO #Rslts
EXEC (@SqlStr)
SELECT...
August 4, 2002 at 11:59 pm
SELECT *
FROM Table
INNER JOIN
(
SELECT Val11 As Col1,
Val12 As Col2
UNION ALL
SELECT Val21,
Val22
) As RS ON Table.Col1 = RS.Col1 AND Table.Col2 = RS.Col2
basically what vyas suggested but without the temp table and...
August 3, 2002 at 1:23 am
Hi ,
i'm sorry , i can't quite follow you , are you talking about some front-end replace problem!?!
August 2, 2002 at 3:39 am
This seems to work fine ,
DECLARE @Var varchar(10)
SET @Var = 'TEST' + Char(39) + 'TEST'
PRINT @Var
SET @Var = REPLACE (@Var,CHAR(39),CHAR(39)+CHAR(39))
PRINT @Var
CHAR(39) is the ASCII Value for single quote
are...
August 2, 2002 at 3:18 am
sp_cursor_list is what you are looking for.
August 2, 2002 at 3:09 am
alternatively, if you want to maintain the numbers yourself then this update should work
DECLARE @IncNo
SET @IncNo = 0
UPDATE <Table>
SET @IncNo = <Column> = @IncNo + 1
August 1, 2002 at 12:46 am
you seem to be storing the dates as character values . use MAX(CONVERT(Datetime,value))
August 1, 2002 at 12:36 am
have you checked for recursive triggers in the second procedure!!?
August 1, 2002 at 12:28 am
Antares,
you are right it should be OR instead of AND , my mistake
and it should be ISNULL(Col,DATEADD(dd,1,@DateVar)) <> @DateVar
but did not understand what you mean by
...
June 19, 2002 at 5:57 am
Viewing 15 posts - 61 through 75 (of 154 total)