Viewing 15 posts - 1 through 15 (of 15 total)
Use a table variable. See https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d7bd8e3f-d08b-4b35-94c0-a81777985edb/logging-messages-even-if-transaction-is-rolled-back#:~:text=SQL%20will%20rollback%20all%20nested%20transactions%20including%20your,from%20the%20table%20variable%20into%20your%20error%20table.
June 21, 2021 at 9:41 am
Use a table variable. See https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d7bd8e3f-d08b-4b35-94c0-a81777985edb/logging-messages-even-if-transaction-is-rolled-back#:~:text=SQL%20will%20rollback%20all%20nested%20transactions%20including%20your,from%20the%20table%20variable%20into%20your%20error%20table.
June 21, 2021 at 9:41 am
Link error on page : This web page has a redirect loop
October 20, 2014 at 2:52 am
SELECT INTO will create a new table and it exists already since you are selecting from it.
Change the statement to something you have done
INSERT INTO #Tmp (col1,col2)
...
September 15, 2014 at 2:41 am
Can change CTE limit with OPTION statement. Example : SELECT * FROM CTE OPTION (MAXRECURSION 123)
If no manager / supervisor then code won't execute the loop
Add SET @NRows =...
September 14, 2014 at 10:51 pm
Disable the trigger and try again.
What does the trigger do (update other tables, etc.)?
Do you run a transaction?
June 15, 2014 at 2:48 am
Is this what you are after?
CREATE TABLE dbo.Corporation_Master(Col1 INT,Colb Varchar(100),Colc MONEY NULL)
GO
WITH cte(ColName,Ordinal_Position) AS(
SELECT 'CM_id',1
UNION ALL SELECT 'CM_Name',2
UNION ALL SELECT 'Transaction_Month',3
UNION ALL SELECT 'Transaction_Year',4
UNION ALL
SELECT
Column_Name,Ordinal_Position+4
FROM INFORMATION_SCHEMA.Columns
WHERE Table_Schema='dbo'
AND Table_name='Corporation_Master')
,cte2(ColName,Ordinal_Position)
AS...
June 11, 2014 at 4:44 am
A BETTER DBA JOB DESCRIPTION FOR EVERYONE
"The same thing is happening with the standard hiring practice. That’s why we need better job descriptions. If you want a SQL Server...
May 12, 2013 at 4:52 pm
CREATE TABLE tmp(iCol INT identity(1,1), some_col varchar(10))
GO
INSERT tmp(some_col) SELECT 'a'
GO 100
DELETE FROM tmp
WHERE iCol % 3 = 0
GO
SELECT TOP 5 *
FROM tmp ORDER BY iCol Desc
GO
WITH cte(a) AS (
SELECT...
March 19, 2013 at 2:04 am
My fault, actually working correctly.
DECLARE @t TABLE(a VARCHAR(100))
INSERT @t SELECT 'abc' UNION ALL SELECT 'd<c>f' UNION ALL SELECT 'ghi' UNION ALL SELECT '<">'
SELECT
CAST(
(SELECT a+','...
March 17, 2013 at 7:13 am
--Generate some data
--Generate some data
SELECT d.*
,IDENTITY (INT, 1,1) AS Row
INTO #Tmp
FROM (
SELECT CONVERT(VARCHAR(10),'A') AS Name,CONVERT(DATETIME,DATEADD(d,1,GETDATE())) AS TheDate UNION ALL
SELECT 'A',DATEADD(d,2,GETDATE()) UNION ALL
SELECT 'A',DATEADD(d,2,GETDATE()) UNION ALL
SELECT 'A',DATEADD(d,4,GETDATE()) UNION ALL
--SELECT 'A',DATEADD(d,5,GETDATE())...
August 18, 2012 at 3:31 am
Don't one just need a barcode font? I have done it in Crystal Reports, one font the text is displayed and another font text is displayed as a barcode. Did...
September 11, 2008 at 6:18 pm
Select (datepart(m,getdate())-1)*(datepart(m,getdate())-3)*(datepart(m,getdate())-5)*(datepart(m,getdate())-7)*(datepart(m,getdate())-8)
🙂
May 12, 2008 at 1:32 pm
Try a covering index on the date column and the info column your are looking for. In other words a non cluster non unique index on the two columns and...
December 11, 2007 at 2:27 am
Viewing 15 posts - 1 through 15 (of 15 total)