Forum Replies Created

Viewing 15 posts - 511 through 525 (of 626 total)

  • RE: Table variable in dynamic query

    GilaMonster (7/2/2015)


    yb751 (7/2/2015)


    --When you want to do this

    SET @query_from = @query_from + CHAR(10) + ' JOIN ' + @TableVariable + ' on ABC.ID = ' + @TableVariable + '.ID...

  • RE: Table variable in dynamic query

    It becomes much simpler to visualize what you are doing wrong when you output your string.

    DECLARE @TableVariable NVARCHAR(50) = 'MyTable'

    DECLARE @query_from NVARCHAR(MAX) = ''

    ---You are doing this

    SET @query_from = @query_from...

  • RE: Are the posted questions getting worse?

    SQLBill (6/26/2015)


    For the author....his delay in getting the rest of the series out means the GoT show will probably finish and then everyone will compare his books to the show....

  • RE: Character matching into patterns plus counts

    TCcool (6/26/2015)


    To create a table that houses all the patterns would take much too long. The rows in the actual tables are in the millions and I am looking for...

  • RE: Character matching into patterns plus counts

    TCcool (6/26/2015)


    Thank you for posting the code formatted correctly - do you, by chance, have a link to the formatting code for this forum regarding "How-To", so that I can...

  • RE: Character matching into patterns plus counts

    Here's what I came up with. You'll have to populate a table with your search patterns.

    DECLARE @people TABLE (Logid INT IDENTITY(1,1), SourceData NVARCHAR(50), Account NVARCHAR(50))

    DECLARE @check TABLE (Pattern NVARCHAR(10))

    INSERT...

  • RE: Character matching into patterns plus counts

    Since your using 2005...

    DECLARE @people TABLE (Logid INT IDENTITY(1,1), SourceData NVARCHAR(50), Account NVARCHAR(50))

    INSERT INTO @people (SourceData, Account)

    SELECT '123X-456','56789' UNION ALL

    SELECT '456/123','A345' UNION ALL

    SELECT 'ABC 345','X567' UNION ALL

    SELECT '456 HELP-123','YCHB' UNION...

  • RE: Are the posted questions getting worse?

    SQLBill (6/25/2015)


    Brandie Tarvin (6/25/2015)


    So... at risk of alienating a potential fan base for my own ensemble-cast novel-in-progress.

    Why did you hate his books (aside from him killing off favorite characters)?

    Was it...

  • RE: LEFT JOIN with OR - performance

    Kutang Pan (6/25/2015)


    My Solution:

    SELECT A.ID,COUNT(B.SomeColumn) AS [CountOfB]

    FROM @T1 A

    LEFT JOIN @T2 B ON B.SomeColumn = A.ID

    LEFT JOIN @T2 B2 ON B2.AnotherC = A.ID

    GROUP BY A.ID

    That should perform better and...

  • RE: LEFT JOIN with OR - performance

    CraigIW (6/25/2015)


    The real joins actually have four other parts. It seemed unrealistic to post the entire schema and would have taken an age to anonymise.

    The originally suggested solution appears to...

  • RE: LEFT JOIN with OR - performance

    EDIT: Sorry I just wasn't happy with my original solution.

  • RE: ssrs 2012 Display specific # of rows with specific row count

    lskidgel (6/24/2015)


    I should probably clarify; the 1st table will display 5 rows of data, and the 2nd table will also display rows of data, although the # of rows...

  • RE: ssrs 2012 Display specific # of rows with specific row count

    I don't know what you are using as your dataset but you could just have two sources.

    I'm just using pseudo code here but something like...

    SELECT TOP 5 Question, Answer FROM...

  • RE: Are the posted questions getting worse?

    Sean Lange (6/23/2015)


    yb751 (6/23/2015)


    GilaMonster (6/23/2015)


    I'll probably be looking to get new kittens/cats later this year. My Siamese died late May, completely unexpected, out of the blue. One day she was...

  • RE: Are the posted questions getting worse?

    GilaMonster (6/23/2015)


    I'll probably be looking to get new kittens/cats later this year. My Siamese died late May, completely unexpected, out of the blue. One day she was fine, next day...

Viewing 15 posts - 511 through 525 (of 626 total)