Forum Replies Created

Viewing 15 posts - 556 through 570 (of 1,132 total)

  • RE: Are duplicate instance names a problem if physical server names are different?

    "We just had a Disaster Recovery test that experienced some problems with servers using a real-time replication software called Double-Take. "

    How interesting - I also had a DR test on...

  • RE: To find freespace of Database using a query

    Already had the SQL statements for 2005 where transaction log space is excluded.

    selectFilePageCnt, ReservedPageCnt, ( FilePageCnt - ReservedPageCnt)as FreePageCnt

    ,FileKb, ReservedKb, ( FileKb- ReservedKb)as FreeKb

    ,FileMb, ReservedMb, ( FileMb- ReservedMb)as FreeMb

    ,FileGb, ReservedGb,...

  • RE: Is it possible to join the result set of a stored proc with a table?

    I have a number of recommendation.

    1. Do not attempt to join the result set of a stored procedure to another table. Instead combine the SQL from the stored procedure...

  • RE: Naming Convention of Stored Procedures

    Take a look at Celko's "SQL Programming Style" where applicable to your question is section 1.2.3 "Avoid Descriptive Prefixes".

    Who is the person specifying this convention? If they do not...

  • RE: What DB are maped to what login?

    Here are some statments for SQL Server 2005.

    IF OBJECT_ID('tempdb..#DatabaseUsers') is not null drop table #DatabaseUsers

    create table #DatabaseUsers

    (DatabaseNamesysname not null

    ,DatabaseUserNamesysname not null

    ,LoginNamesysname null

    )

    -- sys.database_principals.type is S = SQL user, U =...

  • RE: How to write query result in an output file in T-SQL (MSDE)

    Writing to a file from SQL is not supported, so you will need to use one of the SQL Server add-on services.

    How is the process to write the file being...

  • RE: Unexpected Behavior of Default Constraints with ADO.Net

    Defaults only will take affect if the columns are not included in the insert statement. When you include the columns in the insert statement that means you are also...

  • RE: Pivot a list of dates into date intervals

    Here is a solution with no cursors, no variable, no temporary tables, no functions, no identity/sequence columms, and no update statements. Just add a create view. Weekends are...

  • RE: Trigger Trivia

    Regarding "Tip #6 - Triggers execute with the permissions of the user", this is not completely correct. Given the example with tables Contact and ContactHistory and a trigger on...

  • RE: Trigger causing locks on table

    Does table ACCPAC_FedEx_Middleware.dbo.tbl_ORDER have a unique clustered index ?

    If not, then the table is a "heap" and the SQL Server algorithms to determine where to physically insert the row may...

  • RE: Computed Coloun

    Here is a simple solution:

    , DaysDelay as (CASE WHEN SubmitDate IS NULL OR Duedate IS NULL OR Duedate <= SubmitDate then 0

    else DATEDIFF(dd,SubmitDate,Duedate) END )

    , TotalFines as (FinePerDay *...

  • RE: bcp inside a transaction (issue)

    Try using the "BULK INSERT" statement instead, which does support transaction. Be sure the login has the server level role bulkadmin.

  • RE: '' = ' ' ???

    Per the SQL Standard, trailing spaces are ignored in comparision.

    For substring, if the starting position is greater than the actual data length, then a zero length varchar is returned.

    Based on...

  • RE: Difference between Work Tables and TempTables

    From "Alice in Wonderland"

    Humpty Dumpty: When I use a word, it means just what I choose it to mean - neither more nor less.

    Alice: The question is, whether you can...

  • RE: Difference between Work Tables and TempTables

    A Worktable is a temporary table used internally by SQL Server, typically for sorting or for cursor results.

    A TempTable is a temporary table defined by a user.

Viewing 15 posts - 556 through 570 (of 1,132 total)