Forum Replies Created

Viewing 9 posts - 31 through 39 (of 39 total)

  • RE: Headache of csv values and subselects

    Lynn Pettis (7/5/2012)


    joe.eager (7/5/2012)


    Lynn Pettis (7/5/2012)


    And I found it. Try this in place of my original code above.

    DECLARE @StateFipsCSV varchar(500) = '01,03'

    SELECT

    *

    FROM

    [dbo].[ProductInventory] prdinv

    WHERE

    exists (SELECT instr.Item FROM dbo.DelimitedSplit8K(@StateFipsCSV,',') instr INNER...

  • RE: Headache of csv values and subselects

    Lynn Pettis (7/5/2012)


    And I found it. Try this in place of my original code above.

    DECLARE @StateFipsCSV varchar(500) = '01,03'

    SELECT

    *

    FROM

    [dbo].[ProductInventory] prdinv

    WHERE

    exists (SELECT instr.Item FROM dbo.DelimitedSplit8K(@StateFipsCSV,',') instr INNER JOIN

    ...

  • RE: Headache of csv values and subselects

    Lynn Pettis (7/5/2012)


    Note, you may get duplicate rows of data if there are multiple matches, so I'm sure that there may be other ways to accomplish this. I am...

  • RE: Headache of csv values and subselects

    Lynn Pettis (7/5/2012)


    Show us the expected result set from the query based on the sample data. Hate to say it, but I can figure things out much better when...

  • RE: Headache of csv values and subselects

    Sorry forgot the ")"

    Here is the new sample stuff

    CREATE TABLE [GoInventory].[ProductInventory](

    [ProductInventoryId] [int] IDENTITY(1,1) NOT NULL,

    [ContactId] [int] NOT NULL,

    [ProductTitle] [varchar](200) NOT NULL,

    [BriefDescription] [varchar](8000) NULL,

    [TargetAudience] [varchar](1000) NULL,

    [CurrentStatusId] [int] NOT NULL,

    [FundingSource] [varchar](500) NULL,

    [Partners]...

  • RE: Headache of csv values and subselects

    Lynn Pettis (7/5/2012)


    joe.eager (7/5/2012)


    Lynn Pettis (7/5/2012)


    Can you explain a little more what you are trying to return? In fact, it may help if you put together the DDL (CREATE...

  • RE: Headache of csv values and subselects

    Lynn Pettis (7/5/2012)


    Can you explain a little more what you are trying to return? In fact, it may help if you put together the DDL (CREATE TABLE statement), some...

  • RE: Headache of csv values and subselects

    Jeff Moden (7/5/2012)


    joe.eager (7/5/2012)


    I've been beating my head against the wall for a bit with this problem and was wondering if anyone could point me in the right direction.

    Background: ...

  • RE: Headache of csv values and subselects

    michael vessey (7/5/2012)


    joe.eager (7/5/2012)


    I've been beating my head against the wall for a bit with this problem and was wondering if anyone could point me in the right direction.

    Background: ...

Viewing 9 posts - 31 through 39 (of 39 total)