Viewing 15 posts - 1,771 through 1,785 (of 2,171 total)
Yes. I did test with INDEX hint.
In the code posted above, I omitted them becuase the bug feature of only following the clustered index anyway.
At least in the UPDATE. For the...
March 19, 2007 at 8:07 am
The bug feature with clustered index versus non-clustered index and the technique with
SELECT @t = @t + ';' + Name
FROM Table1
was discussed some time ago on the...
March 19, 2007 at 7:41 am
-- Prepare sample data
DECLARE
@Sample TABLE (ID INT, Fld1 INT
March 19, 2007 at 12:20 am
Yeah. I know.
I wasn't sure about the amount of records to start with. I thought there might be only a few hundred of them.
I tested your code on SQL...
March 18, 2007 at 3:38 pm
Try this too!
-- Prepare sample data
DECLARE @Sample TABLE (ID INT, Status VARCHAR(9))
INSERT @Sample
SELECT 1, 'S' UNION ALL
SELECT 2, 'T' UNION ALL
SELECT 3, 'T' UNION ALL
SELECT 5, 'T' UNION ALL
SELECT 10, 'S' UNION ALL
SELECT 16,...
March 17, 2007 at 12:45 pm
Since this is a SQL Server 2005 forum, try this
SELECT
mytable_pk,
col1,
goods
,
maxval
FROM
March 16, 2007 at 9:44 am
Or even more simpler...
SELECT SortColName FROM Table1 WHERE ISNUMERIC(SortColName) = 1 ORDER BY LEN(SortColName), SortColName
UNION ALL
SELECT SortColName FROM Table1 WHERE ISNUMERIC(SortColName) = 0 ORDER BY LEN(SortColName), SortColName
March 16, 2007 at 5:27 am
Maybe this?
SELECT TOP 1 Course
FROM Courses
GROUP BY Course
ORDER BY COUNT(*) DESC
March 16, 2007 at 5:25 am
SELECT PK, MAX(Col)
FROM (SELECT PK, Col1 AS Col FROM Table1 UNION ALL
SELECT PK, Col2 FROM Table1 UNION ALL
SELECT PK, Col3 FROM Table1 UNION ALL
SELECT PK, Col4 FROM Table1
) AS x
GROUP...
March 16, 2007 at 5:16 am
This works for all versions.
http://www.sqlservercentral.com/columnists/plarsson/pivottableformicrosoftsqlserver.asp
February 27, 2007 at 4:41 am
Yes, a simple solution with only one flaw...
What if none of the value in the month columns are >0 ?
Try this test data
--===== Setup a table to test...
February 21, 2007 at 9:21 am
Have a look at this article
http://www.sqlservercentral.com/columnists/plarsson/howmanymoremondaysuntiliretire.asp
February 16, 2007 at 3:07 am
-- prepare sample data
declare @mytable table (account varchar(10
February 16, 2007 at 3:06 am
I have come up with a more general function with some more features such as case sensitive and optional replacement character.
CREATE FUNCTION dbo.fnFilterString
(
February 13, 2007 at 11:33 am
Viewing 15 posts - 1,771 through 1,785 (of 2,171 total)