Forum Replies Created

Viewing 15 posts - 2,431 through 2,445 (of 5,103 total)

  • RE: What is the argument against IDENTITY columns

     Oh man are we going to get back to the religious battle again

    The following is...

  • RE: linked servers and different windows users (domain - stand alone servers)

    The problem is that to use impersonation with Windows authenticated logings "Account delegation" has to be in place at both servers. Have Look in BOL on how to setup Account...

  • RE: Aliasing in Group By statements

    Johnathon,

    The way around it is to embed the case statement in an inline view ( or derived table like others call it)

    ex:

     

    select x,y,z,...

    from

     ( select case when ......... as x,

                case when...

  • RE: Syntax for querying a timestamp column

    Daniel,

    Although I also agree with Kenneth that it is not the proper use for a timestamp you still can use the syntax of your query as:

    Select Count

  • RE: SQL Locking up

    DO NOT use "with TRUNCATE_ONLY" !!!!

    That will break point in time recovery. If you run those statements then you may be better off setting the recovery mode to simple and...

  • RE: Stored proc parameters

    There are several ways to approach this kind of problem:

    1. Create one stored procedure per search type and one stored procecedure which is a wrapper of the above, then, call...

  • RE: Datetime Format

    Well as you already spotted I just swapped the difference but you got the Idea.

    By the way the solution you say you use has nothing to do with your original...

  • RE: String concatenation

    Clyde,

    I think you can get rid of ALL your loops by simply enclosing Ron's logic in a UDF

    create function dbo.concatComments( @id int)

    returns varchar(500)

    as 

    begin

    declare @comments varchar(500)

    select @comments = isnull(@comments, '') +...

  • RE: Log Backups

    Karim,

    If you use TSQL scripts to perform the restore you definitely as DBA need to have knowledge about the correct log sequence and yes SQL will check regardless if it...

  • RE: Denormalisation and the other option.

    Just to add a bit more. This is called an Open schema system. It can be very flexible if you are looking at the extensibility of it but on data...

  • RE: Trigger Help!

    the insert trigger could be something like:

    Create Trigger [dbo].[IT_Restrict_AreaCodes]

    ON [dbo].[dialempty]

    AFTER INSERT

    AS

    BEGIN

    if @@rowcount = 0 return

    Update d set phonenum = '1111111111'

           From dialempty d join  inserted i on d.ProjectID = i.ProjectID

               

    Where...

  • RE: missing backups with interesting data

    This is MY take on these sort of issues.

    If you need to store credit card numbers or SSN you need to encrypt them before storing them. To retrieve you...

  • RE: Datetime Format

    well, if the dates are less that one day appart you can:

    declare @d1 as datetime, @d2 as datetime

    select @d1 = '2005-12-24 12:00:00', @d2 = '2005-12-24 13:00:01'

    select convert( varchar(8), @d1 -...

  • RE: Capturing the user and time of a delete with a DELETE trigger

    There is another way, which is a bit simpler and is to use sp to perform DML and on the "delete" stored procs your app can pass the "audit credentials" in...

Viewing 15 posts - 2,431 through 2,445 (of 5,103 total)