Forum Replies Created

Viewing 15 posts - 9,526 through 9,540 (of 15,381 total)

  • RE: Changing from "hard-coded" to dynamic query

    momba (1/25/2013)


    Sean Lange (1/25/2013)


    Depending on how often you will be running this query you might consider using sp_executesql instead of the more generic exec. It will cache your execution plan...

  • RE: Changing from "hard-coded" to dynamic query

    Depending on how often you will be running this query you might consider using sp_executesql instead of the more generic exec. It will cache your execution plan and more importantly...

  • RE: Cursor to insert missing data

    jeff-weigang (1/24/2013)


    Here is some sample data to help with what I'm trying to achieve.

    TransDate GroupCode Symbol Price

    1/21/2013 ...

  • RE: comparing two tables with similar columns

    wmalik001 (1/24/2013)


    First of, i am sorry for not providing the information in correct format secondly thanks a lot for your replies.

    I will provide the ddl soon.

    No problem. It is hard...

  • RE: comparing two tables with similar columns

    wmalik001 (1/24/2013)


    create script:

    CREATE TABLE [dbo].[tablep1](

    [iNumerator] [float] NULL,

    [iDenominator] [float] NULL,

    [vShortName] [nvarchar](255) NULL,

    [VORGCODE] [nvarchar](255) NULL

    ) ON [PRIMARY]

    This will work but do you really have no primary key?

    Insert script:

    INSERT INTO [comparison].[dbo].[tablep1]

    ...

  • RE: comparing two tables with similar columns

    This should be reasonably close...not sure what columns you are using to determine if it exists.

    select iNumerator, iDenominator, vShortName, VORGCODE

    from Table2

    where NOT EXISTS

    (

    select iNumerator, iDenominator, vShortName, VORGCODE

    from Table1

    Where Table1.iNumerator...

  • RE: comparing two tables with similar columns

    Can you post ddl (create table scripts) and sample data (insert statements)? Something so we can create tables and data locally?

  • RE: Cursor to insert missing data

    You absolutely do not need a single cursor, let alone nested cursors for this. You need to use a calendar table. Just do a quick search on this site and...

  • RE: comparing two tables with similar columns

    Can you post ddl (create table scripts) and sample data (insert statements)?

    I don't understand why the output would be only the one row. None of the rows you posted are...

  • RE: Grouping Active units by YYYYMM

    dclemens (1/23/2013)


    Sean Lange (1/23/2013)


    Your query doesn't produce any results because it has a table called manpowerprofile? If I comment out that table it returns a single value - 26. This...

  • RE: Help with implemting phonetic algorithm

    What a completely bizarre requirement. However you did provide very easy to consume data!!! A solution here is not really too bad. Just add the next character into your CTE...

  • RE: Grouping Active units by YYYYMM

    Your query doesn't produce any results because it has a table called manpowerprofile? If I comment out that table it returns a single value - 26. This is consistent with...

  • RE: Query help

    The kudos belongs to Michael Higgins. He provided the solution. I just suggested a way for you to fit it in with your system. 😀

  • RE: Query help

    s_osborne2 (1/23/2013)


    Hi,

    Thanks for you help.

    I've been playing with this, and you're right it does work but doesn't give me the solution to the problem i have. I've given @table as...

  • RE: Grouping Active units by YYYYMM

    dclemens (1/23/2013)


    Hey everyone! This is my first time posting here (please go easy), but I've been using the site for a while now as a reference.

    I've been working on a...

Viewing 15 posts - 9,526 through 9,540 (of 15,381 total)