Forum Replies Created

Viewing 15 posts - 19,651 through 19,665 (of 26,484 total)

  • RE: Storing variable values, etc.

    okay,

    declare @value int;

    update sometable set

    somecolume = somevalue;

    set @value = @@rowcont;

    exec dbo.InsertRowCount 26,'Description',@value;

    Help a little more?

    As to writing your code for you, no. You give it...

  • RE: SELECT column puzzle

    Also, the table and data provided to seem to match what you showed us in your original post. How about a little more information about what you are looking...

  • RE: SELECT column puzzle

    It would also be nice if you had two or three individuals in the sample data instead of just one.

  • RE: SELECT column puzzle

    peter.nguyen (7/22/2009)


    Hi Lynn

    attached are the table ddl and sample inserts

    thanks

    Okay, but what about the expected results based on the sample data?

  • RE: Storing variable values, etc.

    General frame work:

    update tablename set

    somecolumn = @somevalue;

    set @value = @@rowcount -- capture how many rows were updated;

    exec dbo.insertcounts 26,'description',@value;

    Does this hint help?

  • RE: Index on all columns of a table

    Is CDate the leading column on any or all of the indexes?

  • RE: Saving Query Results and Get notified when changed

    Look up Query Notifications in BOL (Books Online). It was a feature added in SQL Server 2005. This is probably what you are looking for.

  • RE: Indexed view

    Okay, still haven't had enough caffine this morning. I got this one wrong because i misread the question.

  • RE: Changing the default date format of SQL server 2005

    The reason it is failing is because your default date format is dmy. Here is some test code I ran here at home.

    set dateformat mdy

    select cast('2009-07-23 00:00:00' as datetime)...

  • RE: CASE Statement

    johan.brohn (7/22/2009)


    Yes, Kenneth's works but Ken McKelvey's (the one I quoted) doesnt

    Sorry, still half a sleep. Need more caffine.

  • RE: CASE Statement

    johan.brohn (7/22/2009)


    Doesnt work when date1 is not null and date2 is null

    Ken McKelvey (7/22/2009)


    CASE

    WHEN COALESCE(date2, 0) < COALESCE(date1, 0)

    THEN date2

    ELSE COALESCE(date1, date2)

    END

    CASE

    WHEN @d1 < COALESCE(@d2,'20991231') THEN @d1

    ELSE @d2

    END

    Actually...

  • RE: Backup-Restore Error

    You can not restore a SQL Server 2008 backup to a SQL Server 2005 system regardless of the compatibility mode of the database.

    If you need to move a database from...

  • RE: Changing the default date format of SQL server 2005

    sarvesh singh (7/22/2009)


    When i do rt click properties on SQL server it says language spanish.

    When i run a query :

    select * from shifthistory where vfrom='2009-07-23 00:00:00'. i get an error.

    ...

  • RE: Device offline

    Not sure what you mean by an external device, but one possible cause could be permissions. A second could be a network error or problem with the network configuration.

  • RE: Standby Backing up

    Just a guess based on my knowledge of backups and restores only, haven't worked in a logshipping environment yet, but no I don't think you can do that.

Viewing 15 posts - 19,651 through 19,665 (of 26,484 total)