Forum Replies Created

Viewing 15 posts - 76 through 90 (of 122 total)

  • RE: Formulas and Formats

    You can ask this que at

    http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=19&SiteID=1

    Regards,
    Nitin

  • RE: SQL Server 2005 installation question

    You can do this after installation also if you missed do this while installation.

    In management studio Goto server property --> Database setting --> Database default locations

    Regards,
    Nitin

  • RE: Query between Servers

    You can add second server as linked server and an query using full reference name of object like servername.databasename.schema.object

    Regards,
    Nitin

  • RE: How to select the last segment of an IP address?

    MarkusB (1/13/2009)


    Another possiblitity is this:

    DECLARE @ip_part VARCHAR(15)

    SET @ip_part = '192.168.0.27'

    SELECT PARSENAME(@ip_part, 1)

    Thanks Mark,

    I have read about this function but never thought to use for IP manipulation. 😛 I...

    Regards,
    Nitin

  • RE: substring or other method

    Mad-Dog (1/13/2009)


    thx.

    i need the path,not the filename.

    This script will give you path

    DECLARE @s-2 VARCHAR(100)

    SET @s-2 = 'D:\backup\databasename\Backupname.bak'

    SELECT SUBSTRING(@s, 1, LEN(@s) - CHARINDEX('\', REVERSE(@s)))

    Regards,
    Nitin

  • RE: SQL Server 2000 Stored Proc. Tuning

    Grant Fritchey (1/13/2009)


    Under what circumstances have you seen seperating a statement from one procedure into a seperate procedure lead to deadlocks? That's a new one for me.

    If proper transaction are...

    Regards,
    Nitin

  • RE: Date Range of Week

    Try this

    CREATE TABLE #T (DT DATE)

    INSERT INTO #T(DT)

    SELECT '2009-01-01' DT

    UNION SELECT '2009-01-10'

    UNION SELECT '2009-01-12'

    UNION SELECT '2009-01-08'

    UNION SELECT '2009-01-22'

    UNION SELECT '2009-01-16'

    UNION SELECT '2009-01-14'

    UNION SELECT '2009-01-26'

    UNION SELECT '2009-01-06'

    SELECT DT, DATEPART (WK,...

    Regards,
    Nitin

  • RE: Problems with a stored procedure

    m_grasdal (1/13/2009)


    IF NOT (@ingredient = '' AND @ingredientid IS NULL)

    Replace this with

    IF NOT (ISNULL(@ingredient, '') = '')

    Regards,
    Nitin

  • RE: substring or other method

    Try this

    DECLARE @s-2 VARCHAR(100)

    SET @s-2 = 'D:\backup\databasename\Backupname.bak'

    SELECT SUBSTRING(@s, LEN(@s) - CHARINDEX('\', REVERSE(@s)) + 2, LEN(@s))

    Regards,
    Nitin

  • RE: How to select the last segment of an IP address?

    Hey,

    Try this

    DECLARE @s-2 VARCHAR(100)

    SET @s-2 = '192.168.0.27'

    SELECT SUBSTRING(@s, LEN(@s) - CHARINDEX('.', REVERSE(@s)) + 2, LEN(@s))

    Regards,
    Nitin

  • RE: SQL Server 2000 Stored Proc. Tuning

    1. It depends upon the usage of the variable. If you use same variable, many times in sp then better to use variable, instead of sub query each time. And...

    Regards,
    Nitin

  • RE: How SQL server identify each row?

    arup_kc (1/12/2009)


    select user_id, name from users

    where (row_number() OVER (order by user_id)) % 2 = 0

    Any suggestion?

    You can use below query as well

    select user_id, name from

    (

    select row_number() OVER...

    Regards,
    Nitin

  • RE: How SQL server identify each row?

    Sql Server also have ROW_NUMBER function, but it does not give you the storage order. You can use this function is select query by specifying the retrival ORDER.

    For which purpose...

    Regards,
    Nitin

  • RE: Required suggestions on Table design for storing pick list

    Hi Grant,

    I have tried to search for article (MUD), you have mentioned but not finding naything. Can u pls post some details, so that I can find the article?...

    Regards,
    Nitin

  • RE: Performance question

    If temp database uses more space then it might help to increase the storage. Check for the usage of the temp DB.

    Regards,
    Nitin

Viewing 15 posts - 76 through 90 (of 122 total)