Forum Replies Created

Viewing 15 posts - 5,686 through 5,700 (of 14,953 total)

  • RE: DTS Packages Backup and restore

    Save them to the file system, then import them into the new SQL instance.

    - 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: Subquery returned more than 1 value.

    You'll need to move the subquery into the From clause as a Cross Apply or a derived table that you can join to. That will mean the data from...

    - 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: Reuse of Identity column values

    It looks like you're doing this in a more complicated fashion than you need to.

    The easiest way to get missing ID numbers is to compare the IDs to a Numbers...

    - 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: date format

    John Mitchell-245523 (12/14/2010)


    I think the CONVERT function is what you're looking for. Or you could allow the data layer to store the data and leave the formatting to the...

    - 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: date format

    This has all the data on formatting dates in T-SQL: http://msdn.microsoft.com/en-us/library/ms187928.aspx

    Honestly, though, you should be formatting dates in the presentation layer, not in the database or data access layer. ...

    - 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 a push

    Nested outer joins can do weird things like that. Glad you got something working.

    - 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: Round to next 1000 or 100 without Ceiling function

    GilaMonster (12/13/2010)


    Seriously?

    Use the one most suited to what you're trying to do. You don't get prizes for the fanciest, most complex way of writing code.

    If you're trying to round up...

    - 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: Events appearing with a specific date range

    You're welcome.

    - 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: Optimizing This Query

    Craig Farrell (12/13/2010)


    GSquared (12/13/2010)


    You won't be able to use a checksum on text.

    Hmm. Guess I shoulda double checked the older format. It will work for VARCHAR(MAX), however. ...

    - 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: Round to next 1000 or 100 without Ceiling function

    Are you familiar with using Round() and adding .5 to the value?

    DECLARE @Number DECIMAL(9, 2) ;

    SELECT

    @Number = 12300 ;

    SELECT

    @Number AS Original,

    ...

    - 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: Dropping 1000s of objects from database

    Hadn't thought of that, with regards to Access doing that. Yeah, that makes sense.

    - 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: Round to next 1000 or 100 without Ceiling function

    It's what ceiling is for. If you don't want to use it, you'll need to build a version of it. That won't be hard to do if you...

    - 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: Events appearing with a specific date range

    Create a Calendar table, or use a Numbers/Tally table (physical or virtual).

    It'll look sort of like the below.

    DECLARE @StartDate DATETIME;

    SELECT @StartDate = '12/1/10';

    ;WITH

    Numbers (Number) AS

    (SELECT TOP 32 ROW_NUMBER() OVER (ORDER...

    - 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: Script Task Doesn't Work When Package is Scheduled via SQL Agent

    What edition of SQL Server are you running it from?

    - 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: A nonrecoverable I/O error occurred on file

    Have you checked the Windows server logs for anything odd during the backup?

    - 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 - 5,686 through 5,700 (of 14,953 total)