Forum Replies Created

Viewing 15 posts - 586 through 600 (of 3,011 total)

  • RE: DATEADD and leap years

    This is a simpler way to find the last day of the same month last year, if that is what you are after.

    declare @MyDate datetime

    set @MyDate = '2/28/2009'

    select LastDay...

  • RE: can we get this guy banned from the forums?????

    Lynn Pettis (5/24/2012)


    Cadavre (5/24/2012)


    Fizzbuzz is your evil interview? Really? It's as old as dirt (as are the solutions) 😛

    WITH t1 AS (SELECT 1 N UNION ALL SELECT 1 N),

    t2...

  • RE: Log Shipping - Index Maintenance

    Yes. Index maintenance is just like any other transaction, so it is logged and gets applied to the target.

  • RE: Last day of last year

    riya_dave (5/16/2012)


    thanks,it worked in sql.

    but nit in ssrs expression.

    any idea?

    You should ask Reporting Services questions in the Reporting Services forum, instead of a TSQL forum.

  • RE: Last day of last year

    ColdCoffee (5/16/2012)


    This?

    declare @date date = '02/29/12'

    select dateadd(DD, -1, dateadd(YY,datediff(yy,0,@date),0))

    This also works with one less function call.

    select dateadd(yy,datediff(yy,-1,@date),-1)

  • RE: Where are the good Senior Level DBA's?

    I had an interesting experience recently where I was being interviewed by someone without the technical experience to be able to evaluate my skills at a company where I would...

  • RE: Getting Rid of ISNULL

    chandan_jha18 (5/15/2012)


    Hi,

    I had a procedure where there was a condition in where clause:

    where ISNULL(d.[RejectReason], 0) IN (240,241,300,301)

    The column RejectReason is int,null.

    After going through several posts in this forum, I started...

  • RE: Where are the good Senior Level DBA's?

    Jeff Moden (5/12/2012)


    Elliott Whitlow (5/12/2012)


    As a further point, I dislike most aspects of technical interviews purely because in MANY cases they are very subjective and if you don't give them...

  • RE: Do I need a cluster index?

    If those are the only ways you access the table, then a clustered index on col2, col1 would cover all your lookups with no need for additional indexes.

    However, I would...

  • RE: Smelly Power

    Matt Miller (#4) (4/25/2012)


    Michael Valentine Jones (4/24/2012)


    I would think that venting the waste heat into a cluster of greenhouses would make a lot of sense. Grow expensive flowers or...

  • RE: Smelly Power

    I would think that venting the waste heat into a cluster of greenhouses would make a lot of sense. Grow expensive flowers or vegetables in places where they would...

  • RE: Less DBMS dependant application: Oracle, SQL, MySQL and DB2 Less Migration Cost!

    Abrar Ahmad_ (4/24/2012)


    [font="Verdana"]Hi Folks,

    We do have a new pragmatic software with the front-end technologies as N/Hibernate etc. The team has devised a manual sequence/identity mechanism (physical tables with next...

  • RE: Social Media and Interviews

    I would just point out that Facebook's terms of use state the following:

    "...

    You will not solicit login information or access an account belonging to someone else.

    ...

    You will not share your...

  • RE: Right justify numeric columns

    Here is how to do it in your T-SQL query.

    select

    a.MyNum,

    ZeroFilled =

    case when a.MyNum < 0 then '-' else ' ' end+

    right('00000000'+convert(varchar(11),abs(a.MyNum)),11),

    SpaceFilled =

    right(' ...

  • RE: When we talk about fragmentation, is it "Index Fragmentation" always ?

    GilaMonster (4/5/2012)


    george sibbald (4/5/2012)


    I stand corrected, I had forgotten about forwarding pointers. what about internal fragmentation though?

    where I have added a clustered index to a heap I have achieved a...

Viewing 15 posts - 586 through 600 (of 3,011 total)