Forum Replies Created

Viewing 15 posts - 1,921 through 1,935 (of 15,381 total)

  • RE: Help with sql query

    sartis (1/4/2016)


    Hello, So I'm trying to write a query for a timeline view in a web app that I'm developing. I have the following tables and each table has a...

  • RE: Crosstab Query

    Your list of dates is invalid. They need to have single quotes around the values. I would highly recommend doing this as a dynamic cross tab instead of a dynamic...

  • RE: Are the posted questions getting worse?

    TomThomson (1/4/2016)


    Sean Lange (1/4/2016)


    Ed Wagner (1/4/2016)


    Sean Lange (1/4/2016)


    jasona.work (1/4/2016)


    I did the dumbest thing over this past weekend...

    As I had a 4 day weekend (woohoo!) I didn't get to sleep anywhere...

  • RE: Are the posted questions getting worse?

    Ed Wagner (1/4/2016)


    Sean Lange (1/4/2016)


    jasona.work (1/4/2016)


    I did the dumbest thing over this past weekend...

    As I had a 4 day weekend (woohoo!) I didn't get to sleep anywhere close to my...

  • RE: Are the posted questions getting worse?

    jasona.work (1/4/2016)


    I did the dumbest thing over this past weekend...

    As I had a 4 day weekend (woohoo!) I didn't get to sleep anywhere close to my usual time, instead I...

  • RE: Syntax help - How do we change a NOT NULL field to accept a DEFAULT VALUE

    mw112009 (12/23/2015)


    Lets say I have a table

    CREATE TABLE [dbo].[EMR_IN](

    [MEM_NBR] [varchar](50) NOT NULL,

    [SERV_DT] [datetime] NOT NULL,

    [ADMIT_DT] [datetime] NULL,

    [DISCH_DT] [datetime] NULL,

    [SNOMED] [varchar](20) NULL )

    This table already has data

    I want to add...

  • RE: LEAP and LAG behind the scenes

    rs80 (12/23/2015)


    Sorry, there isn't any source code that I have. It's more of a theoretical question. What's the best way to learn how these functions work behind the scenes?...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (12/23/2015)


    Here's my QOTD:

    If it is Christmas, but you don't celebrate, does the tannenbaum still sing carols to the yule log during the Hanukkah code camp?

    This reminded me of...

  • RE: Select the rows that has only numeric data in varchar field

    Alvin Ramard (12/23/2015)


    gsc_dba (12/23/2015)


    Very slick solution Sean, kudos!

    Slick, but definitely not what the OP was asking for. The OP clearly said he wanted to select the values where ZIP...

  • RE: LEAP and LAG behind the scenes

    rs80 (12/23/2015)


    I read an article that LEAP and LAG reduces the efforts of writing code to do a self join in order to get data from previous or subsequent records....

  • RE: Are the posted questions getting worse?

    Ed Wagner (12/23/2015)


    Sean Lange (12/23/2015)


    It is hard to tell if the spammers or IWasBornReady clutters up the feed more. So many useless comments on QOTD from 10 years ago.

    I know...

  • RE: Dynamic SQL and database context

    Why not just your code to spit out the sql then you can copy it to a new window to run it? You can't use dynamic sql like you are...

  • RE: Select the rows that has only numeric data in varchar field

    gsc_dba (12/23/2015)


    There are several ways to achieve the desired results.

    Here is a sample function that will help you get started:

    CREATE Function [fnRemoveNonNumericCharacters](@strText VARCHAR(1000))

    RETURNS VARCHAR(1000)

    AS

    BEGIN

    WHILE PATINDEX('%[^0-9]%', @strText)...

  • RE: Select the rows that has only numeric data in varchar field

    Assuming you are trying to only return those rows with numbers only and not return rows with any other characters you do this pretty easily.

    if OBJECT_ID('tempdb..#ZipCodes') is not null

    drop table...

  • RE: Are the posted questions getting worse?

    It is hard to tell if the spammers or IWasBornReady clutters up the feed more. So many useless comments on QOTD from 10 years ago.

Viewing 15 posts - 1,921 through 1,935 (of 15,381 total)