Forum Replies Created

Viewing 15 posts - 14,311 through 14,325 (of 14,953 total)

  • RE: Syntax error.

    I may be missing something.

    The part after the name of the proc "CompareTables", in parentheses, is a spot to declare input and/or output parameters.

    The first one, "@filefit nvarchar(100)", is...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Updating only changed columns

    Since you can't change the trigger, the only thing I can I can think of is breaking up the update code into batches.

    if (select Col1 from dbo.Table where id =...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Need to return the result of dynamic execution to a variable

    sp_executeSQL can have output parameters. Look that one in Books Online. It should do exactly what you need.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: What is equilent to statspack for sql server 2005 ???

    I think what you're looking for is SQL Server Profiler. You might check that out and see if it will do what you need.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Find Only Yesterday's Orders?

    David Hart (4/7/2008)


    Thanks all for the imput. I loved the thread and shared the complexity with fellow staff.

    For my purposes, The DATEDIFF works well for me because I am...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Find Only Yesterday's Orders?

    mtassin (4/3/2008)


    Ok... after pushing up to 100K rows I see your point.

    Is there a way to use DATEDIFF and get an Index Seek? I'm a little sad that my...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: What is equlient to Oracle "Create Sequence" in SQL Server 2005?

    If I'm reading "Create Sequence" correctly, I think you'll find Identity does what you need.

    Books Online has data on it at:

    ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/8429134f-c821-4033-a07c-f782a48d501c.htm

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: how to search for a string in columns in a table

    Use whatever string you're looking for, of course. Doesn't have to be "hello", can be anything at all.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SQL 2000 upgrade to SQL 2005

    I can't find anything that says there would be a problem with that. I've never had a problem with that upgrade myself, but most of the upgrades I've done...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Updating only changed columns

    The way to do this is something on this order:

    create trigger Updates on dbo.Table

    after update

    as

    if update(Col1) or update(Col2) or update(Col3)

    update dbo.Table

    set Changed = 1

    from inserted

    inner join deleted

    on inserted.id = deleted.id

    where(inserted.col1...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: learning notification services

    I don't know the area, so can't help directly, but have you tried using Google/Yahoo/MSN search to find what you're looking for?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: how to search for a string in columns in a table

    select ColName

    from dbo.TableName

    where ColName like '%hello%'

    That will give you the rows that contain the string "hello". Keep in mind that this will find any string, not just whole words....

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Using SSIS

    The two constraints at the bottom of the table creation script should do the job for you. Make sure those are run after the insert.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SQL 2000 upgrade to SQL 2005

    Which version of SQL 2000 are you using? And which version of 2005 are you upgrading to?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: how to search for a string in columns in a table

    Are you looking for column names or the contents of the columns?

    If column names, then sys.columns has all of those and you can select from that.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 14,311 through 14,325 (of 14,953 total)