Viewing 15 posts - 631 through 645 (of 1,228 total)
mtillman-921105 (1/11/2012)
Wasn't there a band named the Sex Pixels?
Red Day (frown) Green Day (smile)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 12, 2012 at 6:03 am
;WITH Groups AS (
SELECT GroupId = g.Id, g.GroupName, ga.ParentGroupId
FROM dbo.[group] g
LEFT JOIN GroupAssociations ga on g.Id = ga.GroupId
)
, rCTE AS (
SELECT...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 12, 2012 at 12:59 am
latitiacasta (1/10/2012)
Sean: if you are talking about function then its not possible in my case.i want through query only
Why not convert Jeff's function to use APPLY, like this:
SELECT ItemNumber, Item...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 10, 2012 at 10:28 pm
WayneS (1/10/2012)
SQLRNNR (1/9/2012)
SQL Kiwi (1/9/2012)
GSquared (1/9/2012)
Yes, but not at the posts count thing. Just at the "change your name to something even sillier than GSquared" thing.
You don't think 'Aaron...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 10, 2012 at 9:10 am
GilaMonster (1/10/2012)
Greg Edwards-268690 (1/10/2012)
The Bending of light to enable you to become invisible?:-DThat's already been done iirc
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 10, 2012 at 8:48 am
Try picking up all of the year values in one query:
SELECT d.Create_year, COUNT(*)
from blobs b
INNER JOIN (
Select blob_id, Create_year = year(Created_date)
from attachments a
INNER JOIN Purchase_orders P ON...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 10, 2012 at 5:34 am
Aaron Aardvark (1/9/2012)
SQL_By_Chance (1/9/2012)
Do you guys think its possible in If...else as well ?Sorry, I don't understand the question...
Who's Smith?
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 9, 2012 at 11:01 am
Jeff Moden (1/8/2012)
ChrisM@home (1/8/2012)
Dbloc (1/6/2012)
...After the update is done I then Insert these specific rows in to another table.
Why not do this in one step? Select the rows you want...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 9, 2012 at 10:42 am
These are probably the simplest options:
insert into sales (ID,Sales_Jan,Sales_Feb,Sales_Mar,Sales_Apr,Sales_May)
values
(1, 100, 0,0,0 ,0 ),
(2, 120,0, 200, 300,0 ),
(3, 0, 100,0 , 300, 0 ),
(4, 100, 200, 100, 100, 100 ),
(5,...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 9, 2012 at 3:08 am
SQL_By_Chance (1/9/2012)
1 100 1
2...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 9, 2012 at 12:50 am
zwheeler (1/6/2012)
I would like to rewrite this query as an outer join but i donot know how. I wouild like help in rewriting...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 8, 2012 at 10:21 am
Dbloc (1/6/2012)
...After the update is done I then Insert these specific rows in to another table.
Why not do this in one step? Select the rows you want from the 80M,...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 8, 2012 at 3:30 am
Jeff Moden (1/7/2012)
Absolutely incredible, Paul. Great bit of research...
No kidding. What Paul's modestly neglected to mention is the 5-fold performance lift provided by removing the table spool from the...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 8, 2012 at 2:18 am
Sorry about delay. Results from home lappy, specs posted earlier:
/* maxmem 3072:
Table 'StockMovements'. Scan count 1, logical reads 30947106, physical reads 7, read-ahead reads 70, lob logical reads 0, lob...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 7, 2012 at 1:30 pm
nick-1043370 (1/6/2012)
The bummer is it's a different date range each time! Ideally I'd like whatever code I use to get the date range in question first, i.e. find the...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 6, 2012 at 6:41 am
Viewing 15 posts - 631 through 645 (of 1,228 total)