Forum Replies Created

Viewing 15 posts - 1,711 through 1,725 (of 1,838 total)

  • RE: What Index do I need?

    gavinparnaby (10/22/2008)


    We've just switched from multiple Access DB's to a SQL Server 2005 for our datawarehousing, but we're still using Access as a front end for our users.

    I think Lynn...

  • RE: Moving database to different disk with seperate luns for ldf mdf and for indexes

    Here's a script that someone else helped me with (sorry I don't remember who to give credit to). This will generate all of the commands to move your nonclustered...

  • RE: Exchange data in two columns

    I don't think that's quite what the original post asked for, I think he wants to exchange first_name values from different rows. If it doesn't need to be an...

  • RE: Substring function for name

    here's my attempt, after pondering this over lunch:

    SELECT id, LEFT(iname, CommaLoc-1) AS lastname,

    SUBSTRING(iname, CommaLoc + 2, Space2Loc - CommaLoc - 1) AS firstname,

    ...

  • RE: Substring function for name

    In your formula for firstname, you have PATINDEX looking for '%, %', but then taking the 1st LEFT letter, so it will always be returning the space after the comma.

    In...

  • RE: T-SQL Quesry

    OK, vnguyen, yes this solution won't work on 2000, (didn't realize you needed a 2000 solution) but it should work fine on 2005 unless you have compatibility level set below...

  • RE: T-SQL Quesry

    I think I see what you are trying to do, find the difference between each month. Is your column1 an int, datetime, or is it actually storing the month...

  • RE: sp_updatestats

    You're database needs up time 24x7, but is there a time that the system usage is lowwer than others? A healthy database does need some maintenance, and if some...

  • RE: SQL using available ram

    Something to consider when virtual memory paging is happening, it's causing a read from disk and an extra write to disk to happen. When SQL Server is managing its...

  • RE: Inserting Nulls?

    Is this INSERT statement inside a stored procedure? We typically make the parameters of the stored procedure optional when they can be NULL in the database, and then the...

  • RE: Clustered index seek is ver very slow

    arctica82 (10/17/2008)


    CONSTRAINT [PK_test] PRIMARY KEY CLUSTERED

    (

    [DateSince2000] ASC,

    [shape] ASC,

    [EventDateTime] ASC,

    [ID] ASC

    ) ON [PRIMARY]

    ) ON [PRIMARY]

    ...

    Select Top 1 EventDatetime

    From Table1 with(index(PK_test))

    WhereDateSince2000 = @DateSince2000

    And Shape =...

  • RE: Need list of sprocs using key tables

    I have a custom solution that will return not only the stored procedures, views, or triggers that have a specified search string in them, but also what line number the...

  • RE: Selecting the one most recent rating from each grouping and comparing it to the second most recent rating

    Probably the easiest way to write this would be to use a combination of the ROW_NUMBER function to determine how recent each record per GOAL is, and a common table...

  • RE: Alter Index with STATISTICS_NORECOMPUTE

    If you do an ALTER INDEX REBUILD, by default the server will update the statistics on its own. If you did ALTER INDEX REBUILD WITH (STATISTICS_NORECOMPUTE = ON) then...

  • RE: Need help creating a view

    Views based on other views shouldn't be too much of a problem, the database engine typcially is able to resolve a query with a view and a derived table subquery...

Viewing 15 posts - 1,711 through 1,725 (of 1,838 total)