Viewing 15 posts - 1,606 through 1,620 (of 2,007 total)
GilaMonster (8/8/2011)
skcadavre (8/8/2011)
•Temporary tables can be altered with DDL statements whereas table variables cannot.
Essentially, this...
August 8, 2011 at 7:32 am
pkasemsant (8/8/2011)
i....
August 8, 2011 at 6:33 am
Not sure what ".fff" is, but the "T" is ISO8601 -> code 126
SELECT CONVERT(VARCHAR(100),GETDATE(),126)
August 5, 2011 at 4:01 am
pwalter83 (8/3/2011)
Welsh Corgi (8/3/2011)
Do you know what DDL and sample data is?
No actually my English is not good neither are my SQL skills...I do know what a stored procedure is...
August 3, 2011 at 8:54 am
pwalter83 (8/3/2011)
John Mitchell-245523 (8/3/2011)
August 3, 2011 at 5:15 am
Without seeing the tables, data, or requirements this is difficult.
Try this: -
SELECT *
FROM (SELECT *
FROM news
...
August 1, 2011 at 2:18 am
Like this?
DECLARE @string AS VARCHAR(50)
SET @string = 'AAAA, pqrstuv, xxxx-lmn, ZZZsswD'
SELECT '''' + REPLACE(REPLACE(UPPER(@string),' ',''),',',''',''') + ''''
-Edit-
Bear in mind that this will not work if there are ever spaces in...
June 30, 2011 at 3:51 am
Difficult to answer your question with the data you've provided. See the below examples for how to work it out yourself.
DECLARE @TABLE AS TABLE(The_Group INT)
INSERT INTO @TABLE
SELECT 1
UNION ALL...
June 27, 2011 at 9:14 am
Eric M Russell (6/23/2011)
June 27, 2011 at 7:23 am
Something like this?
;WITH id_CTE AS (
SELECT name, status, fordate, a,
ROW_NUMBER() OVER (ORDER BY fordate ASC) AS id
FROM #data),
work_CTE AS (
SELECT name, status, fordate, a, id
FROM id_CTE
WHERE id = 1
UNION ALL
SELECT...
June 24, 2011 at 8:36 am
--Edit--
Misread post.
Very strange behaviour though.
--Edit 2--
If you change the AttribValues CTE to contain the clause, it works.
,AttribValues
AS
(
SELECT ItemNumber, Item
...
June 24, 2011 at 8:02 am
--EDIT--
Have now tested. I've written it to emulate your description rather than your code. If it should be the other way around, let me know. To find out...
June 20, 2011 at 9:22 am
Just to keep anyone that is interested informed, the final version : -
DECLARE @starttime DATETIME, @endtime DATETIME, @interval INT
SET @starttime = '2011-06-13 07:45:00'
SET @endtime = '2011-06-13 20:30:00'
--Minutes
SET @interval = 1
;WITH...
June 17, 2011 at 4:19 am
D'OH!
Was being stupid. The answer is this: -
SELECT DATEADD(MINUTE, DATEDIFF(MINUTE, 0, thedate)/15 * 15, 0)
FROM @TABLE
June 15, 2011 at 3:54 am
Viewing 15 posts - 1,606 through 1,620 (of 2,007 total)