Viewing 15 posts - 7,321 through 7,335 (of 8,760 total)
I don't think your approach is clumsy, in fact if you add a POC (Partition Order Cover) index on the table, this method is very hard to beat!
😎
-- create table
if...
August 27, 2014 at 6:29 am
Talib123 (8/27/2014)
XML and...
August 27, 2014 at 5:15 am
GilaMonster (8/27/2014)
Not digging at you..
Of course not, you would never:-D
... just trying to show the complexities of doing this kind of search. The 'best' way (IMHO) would be to normalise...
August 27, 2014 at 2:28 am
Something like this?
😎
DECLARE @SAMPLE TABLE
(
id_Contract INT NOT NULL
,nm_ContractType VARCHAR(25) NOT NULL
...
August 27, 2014 at 2:16 am
mishrakanchan86 (8/26/2014)
Delete from Table1 with(noloack) where UniqueKey in (Select UniqueKey from TAble2)
Apart from being a futile effort using the nolock hint with update / delete, it is...
August 27, 2014 at 2:06 am
GilaMonster (8/27/2014)
Eirikur Eiriksson (8/26/2014)
Here is an alternative solution using CHARINDEXHow well does that work if you add 'grape' to the search list?
Good point, that will ferment into a false positive;-)...
August 27, 2014 at 1:59 am
Robert Heynen-454800 (8/27/2014)
i.e.
select char(164) + ColumnText + char(164)
The...
August 27, 2014 at 1:53 am
Further on Chris's post, can you provide DDL (create table script) and some sample data?
😎
August 27, 2014 at 1:33 am
Further on my previous snip, here is a more complete code block with some sample data
😎
USE tempdb;
GO
DECLARE @NUM_SAMPLES INT = 100;
DECLARE @SAMPLE_STR NVARCHAR(MAX) = N'declare @p? varchar(10) set @p?=NULL exec...
August 26, 2014 at 10:53 pm
Here is an alternative solution using CHARINDEX
😎
Declare @BaseTable table (PKCol int, Column2Search varchar(2000))
Insert into @BaseTable (PKCol, Column2Search)
Select 1001, 'apple,orange,grapefruit'
UNION ALL
Select 1002, 'grapefruit,coconut'
UNION ALL
Select 1003, 'toast'
UNION ALL
Select...
August 26, 2014 at 9:53 pm
er.mayankshukla (8/26/2014)
I have defined a Nvarchar column of 30 bytes
Lets say
create table demo (name nvarchar(30))
But when I see the length of this column by selecting table and pressing...
August 26, 2014 at 9:58 am
GilaMonster (8/26/2014)
Eirikur Eiriksson (8/26/2014)
... 10 byte row property bitmat etc..
?????
You mean the row header, column and data size entries and offset bytes (which add up to 10 bytes in...
August 26, 2014 at 8:13 am
Further on Gail's answer, the sp_help simply queries the sys.all_columns returning the max_length as "Length", no information is given on the overhead bytes used. All columns carry some overhead such...
August 26, 2014 at 7:39 am
simon_s (8/26/2014)
sorry not familiar with the phrase "go down to the basement" ?
"Go down to the basement / cellar" was just an attempt to mitigate the risk of you throwing...
August 26, 2014 at 4:42 am
simon_s (8/26/2014)
An...
August 26, 2014 at 4:11 am
Viewing 15 posts - 7,321 through 7,335 (of 8,760 total)