Forum Replies Created

Viewing 15 posts - 2,866 through 2,880 (of 8,416 total)

  • RE: Excluding value in Column/sum total

    I may have taken the requirements a bit too literally here, but anyway, here's my shot at it:

    SELECT [Case Number] = case_number,

    ...

  • RE: Today's Random Word!

    tosscrosby (7/22/2010)


    Got a date?

    SELECT CONVERT(DATETIME, '19000101', 112);

  • RE: Help with SQL Coding

    Tasnim,

    Do you get any rows returned from the following query?

    SELECT AppName, AppVer, AIT_ID, COUNT(*)

    FROM Master_Application_List

    GROUP BY

    ...

  • RE: Help with SQL Coding

    Try using the Wizard I mentioned to generate the data (it's the test values I'd like, not just the template INSERT statements). Don't worry too much if you can't.

  • RE: Help with SQL Coding

    Thanks. If you could provide a few rows of INSERT statements for the test data that would be great too.

    (Right-click the database, Generate Scripts...and make sure you select Script...

  • RE: Help with SQL Coding

    You can script the table definitions out using Management Studio 🙂

    It will also script the data if you set the options right.

    Otherwise, it's just too much work to try to...

  • RE: Output Clause

    If the restrictions I mentioned don't apply, the following extension of Adam's code illustrates a single-step alternative:

    Setup:

    USE tempdb;

    GO

    CREATE TABLE dbo.MasterRecord

    (

    ...

  • RE: spliting a varchar(max) into multiples

    Adam Haines (7/21/2010)


    Since we have a known number of columns, we could technically split the data via a split function and then use PARSENAME to split the other data for...

  • RE: Are the posted questions getting worse?

    Lynn Pettis (7/21/2010)


    Please, someone, hit me with the proverbial 2 x 4 if I ever start acting that way.

    *SMACK*

    Just kidding 😀

  • RE: Incompetent or Malicious

    stephen k. gartrell (7/21/2010)


    IANAL, but I find myself forced to contemplate a class action on behalf of the American people in defense of our reputation. :hehe:

    Funny :laugh:

    I had to...

  • RE: Output Clause

    mpradeesh,

    It would help if you could provide some sample data to illustrate exactly what you want to happen.

    There are a number of alternatives.

    Be aware though that using the OUTPUT clause...

  • RE: Help with SQL Coding

    There are a few things to sort out there - could you please post the CREATE TABLE statements for each of the tables involved? It would also help a...

  • RE: Incompetent or Malicious

    CirquedeSQLeil (7/20/2010)


    Even a chat here could be seen as a verbal warning and would be the minimum requirement.

    I disagree. It's perfectly possible to sit down with people to talk...

  • RE: Help with SQL Coding

    This demonstrates one way the problem can arise:

    -- Demo tables

    DECLARE @T1 TABLE (A INTEGER NULL);

    DECLARE @T2 TABLE (B INTEGER NULL);

    -- Add rows with values (1, 2, 3) to table A

    INSERT...

  • RE: Primary key without cluster index

    Rich-403221 (7/20/2010)


    I call shenanigans !!! That's a filtered view, not a filtered index 😛

    :laugh:

Viewing 15 posts - 2,866 through 2,880 (of 8,416 total)