Forum Replies Created

Viewing 15 posts - 13,576 through 13,590 (of 15,381 total)

  • RE: Insert into multiple rows

    Why did those suggestions not work? What values do you want in the second table? You have to give us a little information about what you want so we have...

  • RE: converting to INT from varchar

    Here is the query using Jeff's splitter.

    declare @Stores varchar(2000)

    set @Stores = '325,785,5698'

    --create test data

    ;with Stores(StoreID, StoreName)

    as (

    select 1, 'some store' union all

    select 325, 'Should be found' union all

    select 785, 'also...

  • RE: converting to INT from varchar

    Cadavre (11/4/2011)


    whole (11/4/2011)


    Hi, i have one of the parameter of my procedure as @Stores as varchar(2000) = null,

    which gets values like 325,785,5698 as inputs..

    now i need to query it against...

  • RE: converting to INT from varchar

    John Michael Robertson (11/4/2011)


    What about using Jeff Moden's Tally table to parse the comma-delimited @Stores parameter. Store the parsed values into a temp table to directly join to the dbo.Stores...

  • RE: constant variable

    One big advantage of a const table (I have always called mine control) is that you can very easily get the values out of this table (assuming there are not...

  • RE: Better Query

    90 seconds is an awful long time for a single query. That is a very clear indication that your execution plan is scanning over and over. As a short term...

  • RE: Better Query

    WOW I can see why that times out. Are you familiar with SARGability? You should google "sql server sargable" and spend some time researching that topic. You have so much...

  • RE: Are the posted questions getting worse?

    GSquared (11/3/2011)


    I just found a stored procedure from my predecessor at my current job, and it just kind of made my jaw drop in the elegant simplicity of it's complete...

  • RE: Query Help

    Well if you only want to show records for "SomeGuy" then you already had that. It will only show records for "SomeGuy".

  • RE: Query Help

    Then as suggested you need to add your additional filter to the join condition. Otherwise it will only return those rows where there is a match.

  • RE: Query Help

    allan.madriaga (11/3/2011)


    Hi Guys,

    So here's a question: When I add an extra WHERE clause in my query, the result set excludes rows with NULLS. Why does that happen and how do...

  • RE: Error Message/Error Handling Issue in SP

    Can you more clearly explain what you are trying to do?

  • RE: How to get a user to run a SQL query themselves

    Create a front end for them. Then have somebody either give you permission or write a stored proc to get the data you want.

    Allowing users direct access to sql is...

  • RE: Query performance

    drew.allen (11/2/2011)


    Sean Lange (11/2/2011)


    I agree with Lynn, we need something to go on here.

    However, just in the skeleton you posted you can increase performance AND accuracy to at least some...

  • RE: tsql help

    Just need a case statement like this.

    ;with MyTable (BadColumn)

    as (

    SELECT 'LN1, FN1' UNION ALL

    select 'Lastname2, Firstname2' UNION ALL

    select 'Lastnm3, Fname3' UNION ALL

    select 'Lastname444, Firstname444' UNION ALL

    select 'noname' UNION ALL

    select 'noname'...

Viewing 15 posts - 13,576 through 13,590 (of 15,381 total)