Forum Replies Created

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

  • 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...

  • RE: Faster Deletes

    delete from

    dbo.MainTable

    from

    dbo.MainTable mt

    inner join dbo.DeleteTable dt -- table of primary keys to be deleted

    ...

  • RE: How to restore a db using .bak without the .mdf?

    You only need the REPLACE option on the RESTORE if the .mdf/.ldf files already exist on the server you are restoring the database.

  • RE: Select based on Date- How to?

    Going in a different direction, away from your queries, to indexes. How are you indexing your tables? Will you have a primary key on each table? Will...

  • RE: Development strategy

    I would agree when the Developer Edition of SQL Server was more expensive. With the Developer Edition only costing $50.oo, and it can be used in the development, test,...

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