Forum Replies Created

Viewing 15 posts - 76 through 90 (of 275 total)

  • RE: Clustered Index Seek is limiting factor in query

    You could consider moving the JOIN to Account to an outer query, since it's not needed in the filtering process. Something like below (may not be exact but you...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: SQL 2000 table performance

    Is the table fragmented? If so, how heavily? Please post the results of:

    DBCC SHOWCONTIG( tablename )

    That will also show whether the table has a clus index or not,...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: cross join table based function: weird issue

    I don't think SQL 80 will accept any type of "CROSS APPLY", so that will be limited.

    I guess if you really wanted you could create the proc in master and...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: query updation

    For a reasonable number of columns and/or on a reasonably sized table, this should work OK.

    For a table with a very large number of columns or a large number of...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: ORDER BY with CASE statement

    can't find a way to get it to order by more than one column. Is this not possible using the CASE statement?

    Yes, but your existing code can only handle...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Table growing too large

    How is the existing table clustered?

    With proper clustered indexes, you should be able to access only current records for current requests even without using partitioned views, although such views would...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: How to convert a varchar into numeric field and get the data on condition

    You could try this:

    WHERE [column] NOT LIKE '%[^0-9.]%' AND CAST([column] AS decimal(38, 10)) > 60

    If plus signs can be in the data, change to: '%[^+0-9.]%'

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Disabling index by using select query

    There's not any hint to disable / ignore an index just for a given SELECT statement (you could force it to use a different index, but even that might not...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Primary Key creation - before and after bulk insert

    I'm trying to make sure people don't get a mistaken impression of how SELECT ... INTO works based on absolutist statements that aren't true.

    It's very clear from all the articles...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Primary Key creation - before and after bulk insert

    And a short time later she posted this [emphasis added], after a post from a MS person further pointing out the restrictions for minimal logging:

    "

    The document has a nice chart...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Primary Key creation - before and after bulk insert

    SELECT...INTO is always minimally logged ... (even FULL).

    That's not my understanding, especially for SQL 2005.

    In FULL recovery mode, I thought you got FULL logging, as otherwise point-in-time recovery is not...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Why is a variable treated as a charvar

    But the table name is static, not a variable, as clearly you're passing a literal name to SQL Server.

    SQL Server, unlike Oracle, does not have the capability to use variable...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Why is a variable treated as a charvar

    Not completely true, you can do it using dynamic SQL to create the sql command to execute, however, in this case that is not the way to go. i would...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Primary Key creation - before and after bulk insert

    If the clus index key is an IDENTITY column, you can create that beforehand; SQL "knows" the INSERTs will always be sequential.

    You may be able to create the clus index...

    Scott Pletcher, SQL Server MVP 2008-2010

  • RE: Why is a variable treated as a charvar

    Is there a way for it to be evaluated as a field name?

    No, not in SQL Server.

    SQL does not allow db names, table names, column names or keywords to be...

    Scott Pletcher, SQL Server MVP 2008-2010

Viewing 15 posts - 76 through 90 (of 275 total)