Viewing 15 posts - 8,251 through 8,265 (of 10,144 total)
Spikemarks, is it possible to determine what you want to do from these two posts? I don't think so! How about showing two output lists, one containing what you currently...
January 12, 2010 at 6:55 am
Dugi (1/12/2010)
Did you reach a 2 billion records in your table ... usually the tables cannot have 2 billion records, at least I don't know any case, all data in...
January 12, 2010 at 6:49 am
Ronan
Run this:
SELECT RowMark = ROW_NUMBER OVER (PARTITION BY machname ORDER BY eventtime),
eventtime, [description], machname
FROM scriptlog s
INNER JOIN vmachine v ON v.Agentguid = s.agentguid
INNER JOIN itf_companyID c ON...
January 12, 2010 at 5:13 am
Abhijeet Dighe (1/11/2010)
HiHow to generate 10 digit random unique alpha-numeric string in sql server 2000?
Thanks in advance.
Save yourself from a lifetime of misery and pain, do it properly and use...
January 12, 2010 at 4:46 am
No problem:
SELECT u.*, dupes.MainLastname
FROM #Users u
INNER JOIN (
SELECT UserID, MIN(LastName) AS MainLastname
FROM (
SELECT UserID, LastName
FROM #Users
GROUP BY UserID, LastName
) d
GROUP BY UserID
HAVING COUNT(*) > 1
) dupes ON dupes.UserID =...
January 12, 2010 at 3:36 am
Has anyone played with this yet?
SELECT s.ID, x.*
FROM #Sample s
CROSS APPLY (
SELECT
MAX(CASE d.ColNo WHEN 1 THEN SUBSTRING(d.DodgyStringData, d.b, d.e-d.b) END) AS [Account],
MAX(CASE d.ColNo WHEN 2 THEN SUBSTRING(d.DodgyStringData,...
January 12, 2010 at 3:01 am
Try this:
-- parameters
DECLARE @Year CHAR(4), @Month VARCHAR(10)
SELECT @Year = '2008', @Month = 'February'
-- variable
DECLARE @RowsToReturn INT
-- test rowcount using user-supplied values; ignore parameter if NULL
SELECT @RowsToReturn = COUNT(*)
FROM #test...
January 11, 2010 at 8:47 am
ahmadjk (1/11/2010)
Secondly, the data itself stored in sql table is for present day only , after 24 hours time...
January 11, 2010 at 8:22 am
Fantastic! Three different methods in as many minutes!
January 11, 2010 at 7:28 am
DROP TABLE #Users
CREATE TABLE #Users (UserID INT, LastName VARCHAR(20), FirstName VARCHAR(20))
INSERT INTO #Users (UserID, LastName, FirstName)
SELECT 1, 'Smith', 'John' UNION ALL
SELECT 2, 'Jones', 'James Earl' UNION ALL
SELECT 3, 'Sahathevarajan', 'Rajkumar'...
January 11, 2010 at 7:28 am
Ahmad
I can see where you're coming from with this and I'm pretty sure that in some circumstances, your suggestion might make sense: you're indicating to the user "No, there isn't...
January 11, 2010 at 6:24 am
If there is no matching data for the supplied year/month, then data should be returned for which years / months instead?
I think we've tied this down for months -...
January 11, 2010 at 5:30 am
mullins.tammy (1/11/2010)
There is no relationship between Table 1 and Table 3.Currently, Table 2 is completely empty
If you are joining table 1 to table 3 via table 2,...
January 11, 2010 at 5:13 am
Please post the exact code which you ran, and describe any result set (or error messages). Thanks.
January 11, 2010 at 4:40 am
Try this:
select
...
January 11, 2010 at 4:10 am
Viewing 15 posts - 8,251 through 8,265 (of 10,144 total)