Viewing 15 posts - 3,001 through 3,015 (of 8,731 total)
This article should help you:
http://www.sqlservercentral.com/articles/comma+separated+list/71700/
April 21, 2016 at 12:12 pm
In other news, Prince died today.
If Ramsey scores today, his curse might have become more effective.
April 21, 2016 at 11:51 am
BLOB_EATER (4/21/2016)
Luis Cazares (4/21/2016)
Brandie Tarvin (4/21/2016)
April 21, 2016 at 7:30 am
Brandie Tarvin (4/21/2016)
April 21, 2016 at 7:25 am
Luis Cazares (4/21/2016)
Phil Parkin (4/21/2016)
Luis Cazares (4/21/2016)
DECLARE @Codes nvarchar(500) = 'AZJ,CLC,AZF,DDD'
SELECT REPLACE(@Codes, ',', ''',''')
Are you doing this for dynamic sql...
April 21, 2016 at 6:46 am
Phil Parkin (4/21/2016)
Luis Cazares (4/21/2016)
DECLARE @Codes nvarchar(500) = 'AZJ,CLC,AZF,DDD'
SELECT REPLACE(@Codes, ',', ''',''')
Are you doing this for dynamic sql coding? Are...
April 21, 2016 at 6:37 am
You just need to use REPLACE and escape the single quotes.
DECLARE @Codes nvarchar(500) = 'AZJ,CLC,AZF,DDD'
SELECT REPLACE(@Codes, ',', ''',''')
Are you doing this for dynamic sql coding? Are you aware of sql...
April 21, 2016 at 6:28 am
Just to add timing to the performance tests.
CREATE TABLE temp (ID int, [Date] DATE);
WITH
E(n) AS(
SELECT n FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0))E(n)
),
E2(n) AS(
SELECT a.n FROM...
April 20, 2016 at 12:15 pm
Scalar functions are usually a performance problem because they execute row by row. The best option for performance when you need parameters is an inline table valued function which is...
April 20, 2016 at 9:01 am
Just a small note on your nice suggestion.
You offered first a solution for a many to many relationship. This is useful when a product can have different categories. But you...
April 20, 2016 at 7:27 am
A different version.
WITH Table1(ID,Date) AS
(SELECT ID,Date FROM (
VALUES
(1 ,'1/1/1900')
,(2 ,'1/1/1900')
,(3 ,getdate() )
,(4 ,Getdate() )
) AS X(ID,Date))
SELECT
T1.ID
,T1.Date
,CASE
WHEN MAX(T1.Date) OVER()...
April 20, 2016 at 7:16 am
Mark Dalley (4/19/2016)
8.0
6
1SQLCHAR08000"\""0DUMMY ""
2SQLCHAR08000"\",\""1CODE ""
3SQLCHAR08000"\",\""2MEANING ""
4SQLCHAR08000"\",\""3DESCRIPTION ""
5SQLCHAR08000"\",\""4TYPE ...
April 19, 2016 at 12:41 pm
Mark Dalley (4/18/2016)
OK, used a format file as suggested in Jeff's article, works smoothly. Since some of the fields contain embedded commas, I have changed the real...
April 19, 2016 at 11:57 am
DSNOSPAM (4/19/2016)
I can see SQL Server 2014 in my programs list, but can't seem to find an instance of it to connect to from SSMS
Check the services (in Administrative Tools)...
April 19, 2016 at 10:32 am
Viewing 15 posts - 3,001 through 3,015 (of 8,731 total)