Forum Replies Created

Viewing 15 posts - 12,736 through 12,750 (of 26,486 total)

  • RE: Are the posted questions getting worse?

    Okay, now we really need that Porky the Pig picture with him say move along, nothing to see here. The OP is "closing the thread". Like he was...

  • RE: SELECT where value of one group is distinct

    dwain.c (4/17/2012)


    Lynn's query returns only one row:

    DCODDName

    J6598JOHN

    Which may be what you want. However if you want all of JOHN's records, you can use this:

    DECLARE @t TABLE

    (DCOD CHAR(5), DNAME...

  • RE: Query between month

    Glad to help.

  • RE: Are the posted questions getting worse?

    Any one have a picture of Porky the Pig telling everyone to move along, nothing to see here? That would be a good post to end that thread on.

  • RE: Check Constarint

    CREATE TABLE dbo.three_columns

    (

    A INT NULL,

    B INT NULL,

    C INT NOT NULL

    );

    GO

    ALTER TABLE dbo.three_columns ADD CONSTRAINT [ck_dbo.three_columns.C] CHECK

    (

    (C < 150 OR C > 151)...

  • RE: Query between month

    ScottPletcher (4/17/2012)


    Storing this will allow to keep our query sargable for best index usage.

    Is that really necessary?

    Won't SQL treat computations on a declared variable as a constant, so they are...

  • RE: Query between month

    ScottPletcher (4/17/2012)


    Storing this will allow to keep our query sargable for best index usage.

    Is that really necessary?

    Won't SQL treat computations on a declared variable as a constant, so they are...

  • RE: Are the posted questions getting worse?

    GilaMonster (4/17/2012)


    The "Mr I don't have a clue" thread is starting to resemble a pile-on. Maybe better to just ignore him or at most one post from one person when...

  • RE: Query between month

    Sean Lange (4/17/2012)


    Here is an example with some data.

    --these are your parameters

    declare @date1 datetime = convert(datetime, '20120201')

    declare @date2 datetime = convert(datetime, '20120406')

    select @date1, @date2

    --now we want a variable to hold...

  • RE: Query between month

    jerome.morris (4/17/2012)


    Lynn Pettis (4/17/2012)


    Here is some code to try:

    SELECT

    Con1,

    Con10,

    Con2,

    Con3,

    Con4,

    ...

  • RE: New to SQL

    Also, before posting questions, please read the article Forum Etiquette: How to post data/code on a forum to get the best help[/url]. Follow the instructions provided in that...

  • RE: Query between month

    Here is some code to try:

    SELECT

    Con1,

    Con10,

    Con2,

    Con3,

    Con4,

    Con5,

    ...

  • RE: Filtering rows from one table.

    Read the article Forum Etiquette: How to post data/code on a forum to get the best help[/url]. Follow the instructions provided in that article and give us the DDL...

  • RE: Want to modify the content of the cols

    hbanerje (4/17/2012)


    for example I have a table, which has ID, Service, Subservice cols.

    I want to modify or change 'Surgery Service' to 'XXX-Surgery' for the "Service" col where ID = 123,

    and...

  • RE: Conditional select of identical fields from joined tables

    Nice, ddl for the tables. Now you need sample data (as a series of INSERT INTO statements) and expected results.

Viewing 15 posts - 12,736 through 12,750 (of 26,486 total)