Viewing 15 posts - 391 through 405 (of 423 total)
select
x.*,
y.*
from
(
SELECT *
FROM tblInvoiceMain m
WHERE (m.Paid = 0) AND (m.OrgID = 2556) AND (m.SalesPerson <> N'HI')
) as x
LEFT JOIN
(
select
d.InvoiceNumber,
sum((d.Quantity * d.UnitPrice) * (1 - d.Discount)) AS cDis,
sum((d.Quantity * d.UnitPrice) *...
June 28, 2012 at 12:40 pm
What a friggin mess. If I were SqlServer I'd refuse to run it. Here is how I would format it before even beginning to optimize:
select
*
from
(
select cold2
from table0
)...
June 26, 2012 at 3:23 pm
Pretty formatting is one small feature to be spending $50 on it. I bought QuickMacros for $40 and wrote about 20 custom functions to use in SSMS. They...
June 26, 2012 at 2:35 pm
Personally, non-fixed width fonts drive me nuts in programming, especially for output.
Also I suggest typing the word "oil" in upper and lower cases and the digits 0 and 1 to...
June 21, 2012 at 1:48 pm
declare @t table (id varchar(3))
insert into @t values ('001');
insert into @t values ('005');
insert into @t values ('01-');
select max(id) from @t;
select max( case when isnumeric(id)=1 then cast(id as int) else 0...
June 21, 2012 at 1:14 pm
You got it right! I have a varbinary(max) that holds 25MB and gets updated down to 2MB but even reindexing the clustered index does not recover the space of...
June 14, 2012 at 1:09 pm
I'm having the same problem on a table with a varbinary(max) column. I have 21 rows at 2 MB in the varbinary(max) column totaling about 44 MB for the...
June 11, 2012 at 11:56 am
Pretty cool!
I've been interested in writing a tokenizer and recursive descent parser for handling user entered expressions with variables (column names). But, I knew it would take a week...
November 21, 2011 at 8:50 am
The math is pathetically simple and failing to see patterns is the mark of a beginning programmer. Some problems are too difficult to see patterns in until one has...
October 3, 2011 at 9:25 am
No one has really solved the "impedance mismatch" between developers using Objects in their code and DBAs using Relational tables. I've seen some implementations where just primary keys and...
August 12, 2011 at 1:10 pm
Its a great question. It reminds me of a human stem cell that can become one of about 250 specialized cells in the body. There are design patterns...
August 9, 2011 at 2:57 pm
I tried to make extended properties work for a year but found them too much to manage with all the change scripts I generate day-to-day. Eventually I reworked them...
March 17, 2011 at 9:07 am
Is there ever a problem with moving databases to other SS2008 servers that have different service packs installed, going from SP2 to an SP1 server or vice-versa?
January 20, 2011 at 9:07 am
Thanks David, for such a fine article. After decades of quality training and Six Sigma classes, I believe your predictions about the demise of the unproductive American programmer may...
October 14, 2010 at 3:15 pm
In sql2005 in my application we have lists of primary keys passed to functions so we can't use a lookup table approach as in the article. I've seen parse...
August 10, 2010 at 2:05 pm
Viewing 15 posts - 391 through 405 (of 423 total)