Forum Replies Created

Viewing 15 posts - 391 through 405 (of 423 total)

  • RE: SQL statement problem

    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) *...

  • RE: Performance issue Help

    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

    )...

  • RE: Format SQL (Pro)

    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...

  • RE: Trying to Find the Right Font

    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...

  • RE: Max value in the table

    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...

  • RE: spaceused of a table

    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...

  • RE: spaceused of a table

    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...

  • RE: A simple math expression solver

    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...

  • RE: Conversion of a plain English problem into T-SQL

    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...

  • RE: Table for Object with Multiple States

    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...

  • RE: Table for Object with Multiple States

    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...

  • RE: Extended Properties Introduction

    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...

  • RE: SQL server 2008 Build List

    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?

  • RE: Writing Nearly Codeless Apps: Part 2

    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...

  • RE: Parsing Parameters in a Stored Procedure

    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...

Viewing 15 posts - 391 through 405 (of 423 total)