Viewing 15 posts - 841 through 855 (of 1,229 total)
BinaryDigit (5/13/2011)
thank you, so it doesn't have to be completely different values just that they are unique?
One or the other will do just fine 😉
Jeff Moden has a sample data...
May 13, 2011 at 5:31 am
info-849042 (5/13/2011)
I have a SQL query, like so:
SELECT DISTINCT ID, Name FROM Table
This brings up all the distinct IDs (1...13), but in the 13 IDs, it repeats the name (as...
May 13, 2011 at 4:56 am
Stringzz (5/12/2011)
May 13, 2011 at 3:48 am
Duncan Pryde (5/10/2011)
terrykzncs (5/10/2011)
Unfortunately it is a big table. If I use = and put the exact wording will that be faster? I will have to...
May 13, 2011 at 3:32 am
SELECT
TEN.[tncy-sys-ref] + CASE
WHEN PER.[GENDER] = 'M' THEN '1' ...
May 12, 2011 at 8:56 am
Ryan, can you confirm which version of SQL Server you've been working on please?
Cheers
ChrisM
May 12, 2011 at 8:10 am
Dhruva25 (5/6/2011)
select AVG(DATEDIFF(D,DINVPDOF, DOCDATE)), CUSTNMBR from
(select docnumbr,custnmbr,dinvpdof,curtrxam,
( RANK() over (partition by...
May 6, 2011 at 1:18 am
buddy__a (5/5/2011)
May 5, 2011 at 9:48 am
From Books Online: "CREATE VIEW must be the first statement in a query batch. "
What are you really trying to do by conditionally creating a view?
May 5, 2011 at 9:30 am
Mad-Dog (5/5/2011)
CREATE TABLE [dbo].[TBL_REPORT_COLLECT_USERS_CONNECTION](
[RUN_TIME] [datetime] NOT NULL,
[USERS_COUNT] [int] NOT NULL,
[CONNECTION_COUNT] [int] NOT NULL
here is the insert every hour
INSERT INTO TBL_REPORT_COLLECT_USERS_CONNECTION(RUN_TIME,USERS_COUNT,CONNECTION_COUNT)
SELECT GETDATE()AS 'RUN_TIME',COUNT(DISTINCT loginame) AS 'USERS_COUNT',count(spid)AS 'CONNECTIONS_COUNT'
FROM master.sys.sysprocesses...
May 5, 2011 at 2:49 am
Did your select look like this:
SELECT field1 = (RIGHT(('00000000' + convert(nvarchar(8), ((SELECT count(*) + 1 FROM table1 o WHERE t.field2 > o. field2 and t.field3 = 'xxx')))),8))
FROM table1 t
WHERE t.field1...
May 4, 2011 at 3:22 pm
Gathering information - is it sales for today and the same day last year? If not, please explain in detail.
Do you want sales for this year / last year on...
May 4, 2011 at 11:24 am
Tom.Thomson (5/2/2011)
ChrisM@home (5/2/2011)
Koen Verbeeck (5/1/2011)
ChrisM@home (4/30/2011)
LutzM (4/30/2011)
May 4, 2011 at 2:52 am
Jeff Moden (5/3/2011)
ChrisM@home (5/3/2011)
Here's another version using APPLY without any sneaky tricks.
Chris, run an estimated execution plan of your code against the following 10,000 rows of data and look at...
May 4, 2011 at 2:08 am
Ninja's_RGR'us (5/3/2011)
SQLRNNR (5/3/2011)
WayneS (5/3/2011)
ChrisM@home (5/3/2011)
Jeff, please please please write a book, without changing your style. Give us all an opportunity to repay you for what you've done for us.
+10!
Yes, please...
May 3, 2011 at 12:38 pm
Viewing 15 posts - 841 through 855 (of 1,229 total)