Viewing 15 posts - 1,756 through 1,770 (of 2,171 total)
To keep it simpler...
-- Prepare sample data
DECLARE
@Sample TABLE (Truck_ID INT, Trailer_ID
March 28, 2007 at 12:13 am
Or this SQL Server 2005 way
SELECT
ID,
Sequence
,
Name
FROM
(
SELECT ID,
Sequence
March 28, 2007 at 12:07 am
Also try this if you don't want duplicates in the CODES
SELECT
DISTINCT s1.ID,
STUFF((SELECT
March 27, 2007 at 5:39 am
-- Prepare sample data
DECLARE
@Sample TABLE (ID INT, Code VARCHAR(
March 27, 2007 at 5:05 am
SELECT employeevoip ,
SUM(CASE WHEN Direction = 'INBOUND' THEN hours ELSE 0 END) AS...
March 26, 2007 at 11:02 pm
An equivalent to GETDATE() is
CURRENT_TIMESTAMP
March 26, 2007 at 10:58 pm
CREATE FUNCTION dbo.fnFriendsBetween
(
@From VARCHAR(2),
@To VARCHAR(2)
)
RETURNS INT
AS
BEGIN
IF @From IS NULL OR @To IS NULL
RETURN -1
DECLARE @Friends TABLE (Generation INT, p VARCHAR(2))
DECLARE @Generation INT
SELECT @Generation = 0
March 26, 2007 at 2:30 am
You should use dbo.fnFriendsStep function found here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=73079
It works quit fast and performs well.
//Peter Larsson
March 25, 2007 at 5:33 am
Have a look at my implementation of Dijkstra's algorithm posted here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=77262
March 24, 2007 at 1:00 pm
In this topic you tell use there is a present index for the 100,000 records returned?
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=352569
March 20, 2007 at 6:25 am
How do you store an email "not there"?
Empty string? NULL?
You already have an index on email column...
March 20, 2007 at 5:42 am
100,000 records for same email and password?
Something else is wrong besides long run-time! You should revise your business rules first.
March 20, 2007 at 2:59 am
-- Prepare sample data
DECLARE @Sample TABLE (Number INT)
INSERT @Sample
SELECT 1 UNION ALL
SELECT 10 UNION ALL
SELECT 12 UNION ALL
SELECT 17
-- Try 1
SELECT LowLimit.Number + 1 AS FromNumber,
(
SELECT TOP 1 Number
FROM @Sample AS HighLimit
WHERE NOT EXISTS (
SELECT B.Number
FROM @Sample AS b
WHERE HighLimit.Number - 1 = B.Number
 
March 19, 2007 at 8:48 am
Viewing 15 posts - 1,756 through 1,770 (of 2,171 total)