Forum Replies Created

Viewing 15 posts - 136 through 150 (of 1,478 total)

  • RE: Using DBCC Traceon - Help

    Could it be that someone cycled the log since the time that the deadlock happened? If you create deadlock on purpose from SSMS do you see the deadlock's details...

  • RE: Using DBCC Traceon - Help

    Can you check if the trace flag is still turned on? You can do it with this statement:

    DBCC TRACESTATUS(-1)

    Adi

  • RE: search string that does not contain a string

    One more way:

    declare @test-2 varchar(1000)

    set @test-2 = 'alksjdfhkalsdhf update a;slkfjdlakjsdf where sadlkfjak!sdlfj people_table asdjfadsf'

    Select case when @test-2 like '%update%people_table%' and @test-2 not...

  • RE: memory

    You should configure the maximum amount of memory that the server should use. You can do it with the GUI or with sp_configure and the max server memory (MB)...

  • RE: How To Script Default Value

    The parentheses have to be used when you have a none standard name. For example if you have space in the constraint's name. In other cases it has...

  • RE: How To Script Default Value

    The main difference is that in the first statement you don't assign a name to the default constraint, so SQL Server will assign a name for it. In the...

  • RE: Displaying Column Name

    Why would you need something like that? In any case here is one way of doing it, can you pleas explain why do you need it?

    create table t (abcd1234...

  • RE: Displaying Column Name

    Do you mean something like this?

    select ABCD1234 as ABCD from #TEMP2

    Adi

  • RE: Date Function usage

    Yes, that helps. Here is the code that is based on your code:

    create table sampletable (

    apptid int not null,

    starttime datetime,

    duration int,

    ESO int,

    LSO int

    )

    insert into sampletable values (1,'20130112 09:45:00.000', 10,15,15)

    select...

  • RE: Date Function usage

    If you have the data as columns in table, you can use the column's names instead of variables. If you want to get an accurate example for your case,...

  • RE: Date Function usage

    You can use the datediff function. Here is an example:

    declare @StartTime datetime

    declare @Duration int

    declare @ESO int

    declare @LSO int

    SELECT @StartTime = '20130112 09:45:00', @Duration = 10,

    @ESO = 15, @LSO =...

  • RE: Impact of INdexes

    The first one need more work to be maintained by the server. It will be modified each time that one of the 4 column will be modified. The...

  • RE: How are you adding a semi-colon to existing SQL code when upgrading?

    I'm trying to get use to put semicolons in my code, but I have to admit that most of the times I still don't put them. I remember to...

  • RE: Is it possible to use a parameter for csv values

    The only way to do it is to make it as dynamic SQL. Notice that this will cause concerns about security (permissions issues and SQL injection). If you'll...

  • RE: intersect

    I think that this one does the trick:

    With DistinctPer as (

    select distinct i, j from num),

    NumOfJs as (

    select count(*) as CountOfJs, j

    from DistinctPer

    group by j)

    select j

    from NumOfJs

    where CountOfJs =...

Viewing 15 posts - 136 through 150 (of 1,478 total)