Browse by Tags
» T-SQL (RSS)
Showing page 24 of 24 (235 total posts)
Yeah, yeah, yeah, let's get this out of the way right from the start:
Don't concatenate rows into delimited strings in SQL Server. Do it
Except if you really have to create delimited strings in SQL Server. In which case you should read on.
There was a little discussion on SQLTeam
about the best way to concatenate. I ...
I keep seeing the same suggestion on various ''tips and tricks''
websites: For situations in which you might want to use LIKE in the
WHERE clause, but for which indexes cannot be used, PATINDEX will
So, according to these sources, this:
SELECT *FROM tblWHERE PATINDEX('%abc%', col) > 0
is faster than ...
I keep seeing questions on newsgroups about paging in stored
procedures, and whether there will be a better way in SQL Server 2005.
However, aside from a few answers in newsgroups, I haven't seen any
content on how to do it. So I'd like to spend a few minutes and share
with you the new features that will make paging stored procedures ...
As a personal challenge, I decided to write a UDF that will work just
like T-SQL's REPLACE() function, but using patterns as input.
The first question: How does REPLACE() handle overlapping patterns?
SELECT REPLACE('babab', 'bab', 'c')-------------------------------------------------- cab(1 row(s) affected)SELECT REPLACE('bababab', ...
Someone named ''Krygim'' posted the following question today in the microsoft.public.sqlserver.programming newsgroup:
''Will defaulting a TEXT field to an empty string take up more space
than defaulting it to Null when no data is entered into the field.
Before reading any further, I ask that you think for a moment and ...