Forum Replies Created

Viewing 15 posts - 8,551 through 8,565 (of 26,490 total)

  • RE: Writing

    PhilM99 (3/8/2013)


    I'm a developer and an 'Accidental DBA'. These forums have saved my a%$ more times than I can count. I am always struck by the accuracy and helpfulness seen...

  • RE: partition_id VS. hobt_id

    GilaMonster (3/8/2013)


    opc.three (3/8/2013)


    GilaMonster (3/3/2013)


    They were added as separate columns to support a feature that was planned, partially added to SQL 2005 and later scrapped.

    You know I am curious about these...

  • RE: Stuck on new fault with my update

    this:

    if exists(select 1 from sys.tables where object_id = object_id('dbo.BigTable'))

    drop table BigTable; --Drop SOURCE

    if exists(select 1 from sys.tables where object_id = object_id('dbo.RefTable '))

    drop...

  • RE: Looping without cursor not updating properly

    Welcome to SSC. As it appears you are new here there are some things you need to do to helps help you and for you to get better answers...

  • RE: How can you issue a full backup and not interrupt the LSN's

    Full Backup taken Monday night 6:00 PM.

    T-Log backups taken every 2 hours starting at 8:00 PM until 6:00 PM Tuesday.

    Full Backup taken at 6:00 PM Tuesday.

    Full backups taken every 2...

  • RE: Getting minimum of top n rows without using subquery

    winmansoft (3/7/2013)


    Lynn Pettis (3/6/2013)


    Does this get you started?

    with TopDates as (

    select top (100)

    MyDates

    from

    dbo.MyTable

    order by

    MyDates desc

    )

    select min(MyDates) from TopDates;

    That...

  • RE: Are the posted questions getting worse?

    Me thinks we may have had an epiphany.

  • RE: Stuck on new fault with my update

    alan_lynch (3/7/2013)


    Hi Lynn

    just me again I forgot to mention that yes I want to insert data that does not already exist in the Target Table but if it does exist...

  • RE: remove duplicates IF matches

    vinu512 (3/7/2013)


    Brad Marsh (3/7/2013)


    Thanks Lynn I can appreciate what your saying but the reason I gave you that dummy data is because the data is confidential, I can not simply...

  • RE: Stuck on new fault with my update

    Try this:

    drop table BigTable --Drop SOURCE

    drop table RefTable --Drop Lookup

    --Create a Source table

    CREATE TABLE BigTable

    (

    software_name_raw VARCHAR(255)

    )

    GO

    --Insert records into Source table

    INSERT INTO BigTable

    VALUES

    ('Microsoft Office 2003'),

    ('Microsoft 2003 Office'),

    ('Microsoft Office 2003 Professional'),

    ('Sun Microsystems')

    GO

    --Create...

  • RE: Urgent help need to verify DateDiff is correct?

    observe:

    declare @TestDate datetime;

    select datediff(dd,getdate(),@TestDate)

    select datediff(dd,@TestDate,getdate())

    set @TestDate = '20130318';

    select datediff(dd,getdate(),@TestDate)

    select datediff(dd,@TestDate,getdate())

    -----------

    NULL

    (1 row(s) affected)

    -----------

    NULL

    (1 row(s) affected)

    -----------

    11

    (1 row(s) affected)

    -----------

    -11

    (1 row(s) affected)

  • RE: dynamic sql with IN operator error

    is250sp (3/7/2013)


    Try to do this

    --> Create temtp table

    CREATE TABLE #Test(MonthOfYear int, Year int, Account int,Name varchar(255))

    INSERT INTO #Test

    VALUES(1,2013,1,'A')

    INSERT INTO #Test

    VALUES(12,2012,4,'B')

    INSERT INTO #Test

    VALUES(1,2013,4,'C')

    INSERT INTO #Test

    VALUES(1,2012,1,'D')

    INSERT INTO #Test

    VALUES(1,2013,5,'E')

    --Build dynamic sql

    DECLARE @Month int,...

  • RE: Urgent help need to verify DateDiff is correct?

    dhananjay.nagarkar (3/7/2013)


    I would prefer datediff since that way not dependent of type of date format in DB hence need help please:-)

    If the columns are defined as one of the date...

  • RE: Urgent help need to verify DateDiff is correct?

    If they are DATE or DATETIME data types why not just do this?

    [WorkForce_WorkOrder].[Work Order End Date_WO] <= [WorkForce_WorkOrder].[Previous Work Order End Date_WO]

  • RE: Are the posted questions getting worse?

    Sean Lange (3/7/2013)


    Lynn Pettis (3/7/2013)

    Where is out here?

    Kansas City area. I am actually in a town just to the West of the metropolitan area with a few miles of farms...

Viewing 15 posts - 8,551 through 8,565 (of 26,490 total)