Forum Replies Created

Viewing 15 posts - 8,371 through 8,385 (of 9,641 total)

  • RE: How to determine when a certain field gets a null value? And who/what caused it?

    You could use profiler to create a trace filtering on that tables object_id. Save the trace results to a table and then query looking for when that column is...

  • RE: Backing up and Restoring Tables

    Because I have not had to work on VLDB's and restores never took more than about 15 minutes I always did full backups and restores.

    You might want to look into...

  • RE: many stored procedures vs 1

    meichner (7/17/2008)


    I would take a slightly different approach. I would create one stored procedure that returns all of the fields from the table. I would then do one of the...

  • RE: Back Link on Drillthrough Report

    benlatham (7/17/2008)


    Hi

    Does anyone know how I would include a hyperlink on a drillthrough report for the user to navigate back to the original report? I want to duplicate the...

  • RE: A Simple Question about the Len function

    I'm not sure this is a definitive answer, but I would venture to guess that it does not include trailing spaces because in fixed length character columns SQL Server pads...

  • RE: Moved DB, now Users can't login to my web app.

    NuJoizey (7/17/2008)


    Todd,

    hey, thanks so much for your response, this got me a step closer - Disabling anonymous does indeed solve the immediate problem of my app not seeming to...

  • RE: Reporting Services Help

    If you are using SQL Express with Advanced Data Services to develop your reports you are developing your reports in the SQL 2005 format which is different than the SQL...

  • RE: SSIS How to get a File Name

    Pragmatic Works has a free custom SSIS component called File Properties Task where you can pass the file path variable obtained in the for each loop and one of the...

  • RE: How to create a server level role in 2005

    The syntax is:

    Grant View Definition on [object] to [role]

    or for a schema (will give rights to every object in the schema):

    GRANT VIEW DEFINITION ON SCHEMA::[schema_name] TO [role]

  • RE: searching for a column name

    Lester has a good solution. A key point is to remember to use the INFORMATION_SCHEMA views as they are an ANSI standard so should not go away in the...

  • RE: SSIS temporary storage

    It won't fail as SSIS does things on a row by row basis so you do not need to have 200GB of storage on the machine where the package is...

  • RE: Which is better? (SQL Server Best Practices)

    Christian Buettner (7/16/2008)


    Depending on what you are trying to achieve you can also use LIKE '_%'.

    This will exclude NULLs an empty strings '' (but not the single space strings '...

  • RE: get the first and last day two months ago

    Jeffrey Williams (7/16/2008)


    Here are a few examples:

    SELECT dateadd(month, datediff(month, 0, getdate()), 0)

    ,dateadd(month, datediff(month, -1, getdate()), -1)

    ,dateadd(month, datediff(month, 0, getdate()) - 1, 0)

    ,dateadd(month, datediff(month, -1, getdate()) - 1, -1)

    ,dateadd(month,...

  • RE: Index strcture

    By default when you define a Primary Key in SQL Server you get a clustered index on the Primary Key. You can manually make the Primary Key Non-Clustered. ...

  • RE: get the first and last day two months ago

    Here is SQL that will do it, albeit without the variables:

    [font="Courier New"]SELECT

        DATEADD(DAY, -DAY(GETDATE()) + 1, DATEADD(MONTH, -2, GETDATE())) AS first_day_2_months_ago,

        DATEADD(DAY, -DAY(GETDATE()), DATEADD(MONTH, -1, GETDATE())) AS last_day_2_months_ago[/font]

Viewing 15 posts - 8,371 through 8,385 (of 9,641 total)