Forum Replies Created

Viewing 15 posts - 23,671 through 23,685 (of 26,490 total)

  • RE: Overlapping query help

    Just an observation, but you really should evaluate if the Primary Key (Reservation ID) is actually the best choice for your clustered index on the table. You should review...

  • RE: Select based on Date- How to?

    shailesh (11/19/2008)

    Where dbo.ufn_GetDateOnly(EndDt) <= '01/01/2009'

    And doing this can result in your query not taking advantage of indexing on a table. If your tables are small, you may not...

  • RE: Custom Function: Unexpected Results :crazy:

    The code samples I provided will actually go either way. They go backward with positive values, and forward with negative values. A little counter-intuitive, but that was because...

  • RE: Are the posted questions getting worse?

    I don't think the comments here are meant to be elitist, just frustration. There have been threads on some forums where more information has been requested, the OP has...

  • RE: Delete rows from the table using cursor

    Nandy (11/18/2008)


    Hi All,

    I have used the cursor in the stored procedure to delete the data from the table. I'm deleting the data from table where I used the same table...

  • RE: DataBase Restore Problem

    Once you "recover" the database doing a restore with recovery you can no longer apply differential or transaction log backups to the database. You have to redo the restore...

  • RE: connect to Sftp using putty ssis

    With mput, I think you would have to cd down a level first.

  • RE: Dangers of using MYSQL...What are they?

    SELECT LAST_DAY(NOW() - INTERVAL 1 MONTH)

    SQL Server Equivalent: select dateadd(mm, datediff(mm, 0, @TestDate), -1)

  • RE: Are the posted questions getting worse?

    I have to agree as well. Most of us do want to help others who are having difficulties. Look at how many of the regular contributors now have...

  • RE: Format "1" as "01"

    riga1966 (11/18/2008)


    Thank you Lynn.

    So

    right('0' + ltrim(rtrim(@str)), 2)

    only adds leading 0 in case LEN is less than 2?

    I'm just trying to understand the mechanism...

    Actually, it is always adding a leading...

  • RE: Custom Function: Unexpected Results :crazy:

    Here is some test code for you to check out:

    declare @TestDate datetime,

    @Interval smallint;

    set @Interval = 0;

    set @TestDate = getdate();

    select dateadd(mm, datediff(mm, 0,...

  • RE: Custom Function: Unexpected Results :crazy:

    Quick question, how is the second value used? Does it always go backwards or can it go forward.

    Example:

    declare @TestDate datetime;

    set @TestDate = getdate(); -- 2008-11-18 11:15:35.333

    select SOM(@TestDate, 0); --...

  • RE: Format "1" as "01"

    riga1966 (11/18/2008)


    The field is CHAR(2)

    Users enter "1", "01","4","04"

    I want to display it always as "01","02","03" format.

    What is the best way to do it?

    declare @str char(2);

    set @str = '1';

    select right('0' +...

  • RE: The flow of an UPDATE STATEMENT with a FROM CLAUSE

    Also, besides providing the sample data, be sure to provide the expected results when the query is run. We need something to check against.

  • RE: The flow of an UPDATE STATEMENT with a FROM CLAUSE

    I have tried to help with particular problem as well. It is a form of running-total problem and prehaps what would help is more than just a couple of...

Viewing 15 posts - 23,671 through 23,685 (of 26,490 total)