Viewing 15 posts - 39,796 through 39,810 (of 59,098 total)
SQL Compare does something in the background to check dependencies. You could probably do something similar but, I have to ask, why don't you want to use SQL Compare...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 10:43 pm
Heh... looks like Lutz was right.
In that case, we can keep this really short...
;
WITH cteAllDates AS
(
SELECT s.Dept, s.Acct, DATEADD(mm,DATEDIFF(mm,0,p.Period),0) AS PeriodStart, p.Period, 0 AS Credit, 0 AS Debit
...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 10:26 pm
"Best Practices"... heh... all I'm going to say about that subject is "It Depends". 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 8:36 pm
Ummmm.... so what do you want to do if the underlying tables don't exist?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 7:03 pm
haggisns (2/8/2010)
I have the following basic data:
rowid orderid cost
1 1 10
2...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 6:56 pm
surya-434952 (2/12/2010)
... i need to insert credit and debit values as '0'
That's a bit of an ambiguous statement as it is... WHERE do you want to insert the zero values?...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 5:23 pm
Lutz,
I'm possibly missing the bubble here... why wouldn't the following two entries be added together for a single "period"?
SELECT '2','2','20090205','200','80' UNION ALL
SELECT '2','2','20090207','200','80'
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 4:13 pm
You bet... thanks for the feedback, UT.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 2:54 pm
mark.pleasance (2/11/2010)
I'm not a lumberjack, or a Furtrader,
and I don't live in an igloo, or eat blubber or own a dogsled.
And I...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 2:36 pm
As yet another side bar, an "accidental cross join" can also be in the form of what is known as a "Triangular Join". Take a look at the following...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 12:20 pm
UT- (2/12/2010)
Jeff Moden (2/12/2010)
Accidental cross joins are actually quite common and are a typical cause of TempDB going nuts.
Thanks Jeff, can you please give me an example of "Accidental" cross...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 12:05 pm
I haven't tried his, but Steve's looks like it'll work just fine (as he says, not in 2000), as well. He does it by building an on-the-fly Tally table...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 10:37 am
Jakke (2/12/2010)
The "Quirky Update" did the trick 🙂
I tested it against about 20000 records and the outcome was satisfying and quite fast as well.
Next, i will put it on...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 12, 2010 at 5:43 pm
Jakke (2/12/2010)
The "Quirky Update" did the trick 🙂
I tested it against about 20000 records and the outcome was satisfying and quite fast as well.
Next, i will put it on...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 12, 2010 at 5:39 pm
AndrewSQLDBA (2/12/2010)
I think that I have figured out a way by using a temp tableThanks
Andrew SQLDBA
Cool... can you share it please?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 12, 2010 at 5:32 pm
Viewing 15 posts - 39,796 through 39,810 (of 59,098 total)