Forum Replies Created

Viewing 15 posts - 181 through 195 (of 444 total)

  • RE: Source Code Control for SQL Server

    Thanks for the reply.

    You can connect directly to TFS from SQL Server Management Studio. It will allow you to create a solution and add scripts to it, check them in...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: To find the count of a particular character inside a string

    Thanks for pointing out. But the issue is still handleable with Len() function and without using nvarchar.

    Declare @v-2 varchar(100)

    Declare @i int

    Set @v-2 = ' ~ 1234 ...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Auto Generating Scripts in SQL Server 2005

    In SSMS,

    Right Click Database --> Tasks --> Generate Scripts

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: How to looping all column of each row ?

    Select * from TestServer.TableA

    Except

    Select * from ProductionServer.TableA

    And

    Select * from ProductionServer.TableA

    Except

    Select * from TestServer.TableA

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Deleting huge data from a table

    If youare deleting all rows from the tables, Use Truncate command to accomplish your task.

    OR

    Try deleting in Batches.

    This option is discussed in the following link.

    http://www.rikertothebridge.com/2009/03/deleting-data-in-sql-server-without-exploding-your-transaction-log/comment-page-1/

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: What do you use to store useful t-sql code?

    For different DDL Statements (CREATE, DROP), Template Explorer in SSMS is the best place to get the idea and then BOL.

    For scripts, it depends upon your needs. I personally have...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: To find the count of a particular character inside a string

    Duplicate post. Already answered this question in another post.

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: To find the count of a particular character inside a string

    Glad it helped you.

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Update table from XML

    declare @xml xml

    set @xml = '<items><item id="1" ISDELETED="D"></item><item id="2" ISDELETED="D"></item><item id="3" ISDELETED="D"></item></items>'

    Update MyTable

    Set ISDELETED = B.ISDELETED

    From MyTable A

    Inner Join

    (

    select xmlcol.value('@id','int') as ID,

    xmlcol.value ('@ISDELETED', 'char(1)') as IsDeleted

    from @xml.nodes ('/items/item') tbl...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: To find the count of a particular character inside a string

    The issue here is: I dont want to replace the original string

    I am not replacing the Original string. I have used Len() function and in that Function I have...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: T-SQL Statement Error

    Hi mr_adeelalisyed,

    The reference posted by you in

    http://www.java2s.com/Tutorial/SQLServer/0400__Transact-SQL/SimpleSELECTquerywrittenusingvariablesforfieldnames.htm

    gives a slight hint of issue that you might be facing.

    I think you are trying to execute

    TransactionErrorAuditID, TransactionErrorAuditSequentia, ErrorCode, ErrorMessage

    But...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: To find the count of a particular character inside a string

    Already Posted a solution...

    Declare @v-2 varchar(100)

    Declare @i int

    Set @v-2 = '12~12~~1234~13~~12~3~~'

    Select @i = Len(@v) - Len(Replace(@v,'~',''))

    Select @i

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: To find the count of a particular character inside a string

    Declare @v-2 varchar(100)

    Declare @i int

    Set @v-2 = '12~12~~1234~13~~12~3~~'

    Select @i = Len(@v) - Len(Replace(@v,'~',''))

    Select @i

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: create a unique number with date (year)!?

    Simple Solution would be adding another column as Year and add 2009 / 2010 in that column and Define A composite Primary Key on Year Column and Demandid column.

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Database-scoped dynamic management views

    Lost... Didn't read the question properly....

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

Viewing 15 posts - 181 through 195 (of 444 total)