Viewing 15 posts - 1 through 15 (of 136 total)
But I tried with different tables/columns and collations, and it never failed ...
sys.objects.name is (on my server) Latin1_General_BIN, and "where name = ('sysrscols' collate Latvian_CS_AI_KS) collate French_CI_AS" does not fail...
April 25, 2025 at 1:51 pm
Why then does this works in SQL Server 2022:
select *
from sys.objects
where name = ('sysrscols' collate French_CI_AS) collate French_CI_AS;
and also
select *
from sys.objects
where name = ('sysrscols' collate Latvian_CS_AI_KS) collate French_CI_AS;
April 25, 2025 at 6:48 am
Good article.
I find this type of wrong triggers in a lot of databases.
I also start with adding "set nocount on" at the start of each trigger.
Otherwise, an update/insert/delete statement also...
March 21, 2015 at 6:08 am
I changed the code and made it a stored procedure in my dba database.
I also added a filter to list only enabled jobs.
if object_id('dbo.usp_mailFailedJobs') is null exec('create procedure dbo.usp_mailFailedJobs as...
May 28, 2014 at 4:21 am
I have this version, and it does NOT support compression :
productversion:11.0.2383.0
productlevel:RTM
edition:Web Edition (64-bit)
September 25, 2013 at 7:30 am
I am still trying to make the script MS SQL 2012 compatible.
How can I send you the adapted script ?
April 12, 2013 at 1:09 pm
Awesome script, thanks a lot.
I wanted to try this on my server, but failed because my server uses collation 'Latin1_General_bin' ( case sensitive => also for object names ).
I changed...
April 12, 2013 at 8:19 am
You can easely resolve the "unique" problem by adding a distinct to the select top().
I tried this, and it works fine on SQL 2005. The distinct will not generate an...
August 13, 2010 at 9:38 am
[font="Courier New"]I suppose there is only 1 customer, and 1 or more subcustoerms. This query would do the job :
DECLARE @docHandle int
DECLARE @doc varchar(1000)
SET @doc ='
...
October 26, 2007 at 10:58 am
Here is an exemple : ( but 53 becomes AZ ?! )
create function dbo.fn_conv ( @number int )
returns varchar(3)
as
begin
-- next 2 variables could be parameters
declare @charset varchar(255)
declare @len int
set @charset...
February 13, 2007 at 12:30 am
Strange XML ... But you can do it like this :
SELECT *
FROM OPENXML (@docHandle, '/ShipmentHeader',2)
WITH (SettleFlag char(1) '@SettleFlag',
I use my stored procedure sp__droptable to test existance of a table ( also temp table ) and ropt it.
You can use sp__droptable '#tmp'.
Script to create the procedure ( in...
April 14, 2006 at 2:36 am
Do not forget that the inserted table can have multiple rows.
You should test this !
April 14, 2006 at 2:29 am
INTO : only for first select
UNION : If distinct is needed, do not use UNION ALL, but use UNION
Correct syntax is :
SELECT DISTINCT Column1 AS Name
INTO New_Table
FROM Old_Table
UNION
SELECT DISTINCT Column2 AS...
April 14, 2006 at 2:26 am
your demand is not very clear ( what is first? ), but this script could be a start :
set nocount on
go
use tempdb
go
if object_id('ori') is not null drop table ori
if object_id('TableA')...
April 13, 2006 at 5:37 am
Viewing 15 posts - 1 through 15 (of 136 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy