Viewing 15 posts - 31 through 45 (of 97 total)
ChrisM@home (3/23/2012)
DECLARE @pString VARCHAR(8000), @pDelimiter CHAR(1)
SET @pString = 'one,TWO,THREE,FOUR,five,six,seven,eight,nine,ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen,eighteen,nineteen,twenty,twenty one,twenty two,twenty three,twenty four'
SET @pDelimiter = ','
SELECT
ItemNumber = CAST(0 AS BIGINT),
Item = LEFT(@pString,...
March 23, 2012 at 3:29 pm
Jeff Moden (3/22/2012)
ChrisM@Work (3/19/2012)
SELECT n = (n1 + n2 + n3 + n4)
FROM (((VALUES (0),(100),(200),(300),(400),(500),(600),(700),(800),(900)) t3 (n3)
CROSS JOIN (VALUES...
March 23, 2012 at 8:04 am
tobe (3/16/2012)
select monthNumber
, DATENAME(MONTH,DATEADD(MONTH,monthNumber,0)- 1) MonthName
from ( values (1), (2), (3), (4), (5), (6),...
March 16, 2012 at 1:18 pm
Jeff Moden (3/15/2012)
March 15, 2012 at 6:09 pm
Jeff Moden (3/14/2012)
the sqlist (3/13/2012)
CTE is nice at times but we have to keep in mind that it doesn't work on all platforms so I would avoid it
I hope...
March 15, 2012 at 10:26 am
Make it a view to be easier:
create view vwMonths as
select
N+1 as month_nr,
datename(mm,(dateadd(mm,N,'2012-01-01'))) as month_name
from
(
select 0 as N union
select 1 as N union
select...
March 14, 2012 at 10:40 am
Here:
select
N+1 as month_nr,
datename(mm,(dateadd(mm,N,'2012-01-01'))) as month_name
from
(
select 0 as N union
select 1 as N union
select 2 as N union
select 3 as N union
select...
March 14, 2012 at 10:38 am
No offense but this should be an example of how NOT to do things in SQL server. Before writing anything we should make sure that we actually understand what we...
March 13, 2012 at 5:31 pm
the sqlist (8/11/2011)
amir.mochtar (8/10/2011)
i created #tmp table when processing large of rows then i made index for some columns, those are often used in inquiry. Did i do right?
The only...
August 11, 2011 at 7:17 am
amir.mochtar (8/10/2011)
i created #tmp table when processing large of rows then i made index for some columns, those are often used in inquiry. Did i do right?
The only problem with...
August 11, 2011 at 7:11 am
alen teplitsky (8/10/2011)
August 10, 2011 at 8:37 am
Patibandla (8/10/2011)
But with select into you cannot have an identity column , you have to use row_number otherwise , which may affect the performance when you are dealing with large...
August 10, 2011 at 8:30 am
martha-1063616 (8/10/2011)
select distinct CONVERT(nvarchar(30), (KO.a)) AS a,
CONVERT(nvarchar(30), (KO.b)) AS b,
Navn AS Name
into#MyTempTable
fromTable 1KO
INNER JOINTable 2KU
ONKO.NR...
August 10, 2011 at 7:21 am
A temporary table is available as long as the database connection with which it was executed is still open. If it is declared with the "##" prefix, it is a...
August 9, 2011 at 7:02 am
Thus, my question:
In the query
SELECT *
FROM table1 t1
INNER JOIN table2 t2
ON t1.col1 = t2.col1
AND t1.col2 = t2.col2
AND t1.col3 = t2.col3
when I have three indexes, one each on col1, col2 and...
January 21, 2011 at 11:05 am
Viewing 15 posts - 31 through 45 (of 97 total)