Forum Replies Created

Viewing 15 posts - 511 through 525 (of 8,416 total)

  • RE: Forcing Query Plan.

    permono.sam (5/26/2012)


    What other factors for example? I do not mention because maybe I do not know that some things will be those :-D. Looks like the plan in...

  • RE: Set based iteration

    Jeff Moden (5/26/2012)


    Are we good now?

    Sure. 😎

  • RE: insert values in table

    Link to INSERT documentation: http://msdn.microsoft.com/en-us/library/ms174335(v=sql.105).aspx

    Example code:

    DECLARE @temp1 AS TABLE

    (

    account_id char(5) NOT NULL

    ...

  • RE: insert values in table

    Gullimeel (5/25/2012)


    Use the following

    insert into @temp1 select "account's value"

    Msg 207, Level 16, State 1, Line 2

    Invalid column name 'account's value'.

    or

    insert into@ temp1 select 'account''s value')

    Msg 102, Level 15, State 1,...

  • RE: help on SQL

    sqlfriends (5/1/2012)


    I have two tables , the schema is attached. I would like to get the result as the second attachment.

    Why do you have comma separated values in your...

  • RE: Query help

    Jeff Moden (5/25/2012)


    An example of what I mean, though... We're still "stuck" on SQL Server 2005 at work. If I wanted to take a break at lunch and answer...

  • RE: SQL help to CONCATENATE column values

    sqlfriends (5/3/2012)


    Is cross apply no longer available in SQL server 2008?

    It was not available in SQL Server 2000, so if your database is set to 2000 compatibility mode (80), you...

  • RE: View and Script return different results when Join by other tables.

    CptCrusty1 (5/25/2012)


    I also found an article regarding the query execution order:

    1. FROM

    2. ON

    3. OUTER

    4. WHERE

    5. GROUP BY

    6. CUBE | ROLLUP

    7. HAVING

    8. SELECT

    9. DISTINCT

    10 ORDER BY

    11. TOP

    Please bear in mind that...

  • RE: A cursor with the name 'CursorName' already exists.

    Your 2000 instance probably had the CURSOR_DEFAULT database option set to LOCAL (the default is GLOBAL).

    See http://msdn.microsoft.com/en-us/library/ms190249(v=sql.105).aspx

    Example change script:

    ALTER DATABASE <database_name>

    SET CURSOR_DEFAULT LOCAL;

  • RE: Forcing Query Plan.

    permono.sam (5/26/2012)


    From what I have read, when optimizer running a query, it searches best plan for using index, join mechanism, etc. So how do I force the SQL Server...

  • RE: Will partitioning help?

    Gullimeel (5/26/2012)


    If i were in such a position I would do following:

    Perform a small test for alternate methods using the most common load Iincluding dmls/maintenance) and see which one is...

  • RE: Will partitioning help?

    GilaMonster (5/22/2012)


    andersg98 (5/22/2012)


    Yes. The concept is called 'partition elimination'. Especially when scanning the table for a date range, the optimizer will realize it only has to scan the...

  • RE: Will partitioning help?

    Gullimeel (5/26/2012)


    I do not want to go that path anymore. I was not testing the performance of max/min or top 1.I used wrong operator to show what i wanted to...

  • RE: Will partitioning help?

    Gullimeel (5/26/2012)


    Next time I wont save the typing efforts because it has caused much more typing then i thought it would save me(not a nice optimization decision:-)) so that discussion...

  • RE: Will partitioning help?

    Gullimeel (5/26/2012)


    You have misunderstood me. I was not chekcing the performance of the min or max in any way or top 1 etc.

    You're missing the point. I'm not talking...

Viewing 15 posts - 511 through 525 (of 8,416 total)