Forum Replies Created

Viewing 12 posts - 61 through 73 (of 73 total)

  • RE: Which query will give an error?

    Thank you all dear!!

    It was Independence day of India, so I couldn't reply.

    Thank you once again, hope this was helpful to all.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Accurate Time between Two Dates in Year, Month,Day Format

    Sure dear!,

    I will use your query, I have tested this. seems good. Thanks once again.

    Hope this will helpful to all.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Accurate Time between Two Dates in Year, Month,Day Format

    Thanks ChrisM@Work for your comment. I got the tone.

    Generally UDFs are slow as compare to same query.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Accurate Time between Two Dates in Year, Month,Day Format

    subhanshu-khurana (8/12/2014)


    -- nvarchar(15) doesn't give complete value

    it should be atleast nvachar(35)

    you are right subhanshu-khurana

    I have already send request for this.

    Thanks for the comment.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Parse out the first 3 characters

    Use below example :

    DECLARE @i TABLE( mychar VARCHAR(50)

    ,deriv as SUBSTRING(mychar,1,3) --Use this

    ,newderiv as left(mychar,3)); --Or use this

    INSERT @i VALUES ('Steve'), ('Stephan'), ('Stephanie')

    ...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: List all the fields of a table with its properties + PK

    Good Script..

    It somewhat works like select the table and press alt+f1 .

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Calculating Working Hours

    Your welcome dear!

    Still it is difficult to understand and change the script.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Email Failed SQL Jobs

    Good script 🙂

    Either use

    USE msdb

    GO

    in starting or...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Calculating Working Hours

    Interesting Script. 🙂

    But it is not a good practice,

    Although you have described every thing about the script, You should create script dynamically because all organizations have different timings,

    Scholars...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Restore All Backups

    This script will fail while databases are in use.

    User have to manually kill all processes related to those databases, which have to restore.

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Truncate Referenced Table

    Then use following link -

    Truncate all tables reference foreign keys[/url]

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

  • RE: Defragmentation and update statistics for all online databases

    Hi This Script will not give any output but will rebuild or reorganize indexes.

    This Script is only for production environment and it will create a job, You have to run...

    Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature

Viewing 12 posts - 61 through 73 (of 73 total)