Forum Replies Created

Viewing 15 posts - 22,036 through 22,050 (of 26,490 total)

  • RE: Stored Procedures

    JacekO (3/12/2009)


    Lynn,

    If I am not mistaken the SAVE POINTS still does not provide you with an option to nest. It allows you to rollback to a certain point but...

  • RE: like condition

    Here is some test code. Let me know if this helps.

    declare @teststr varchar(20);

    set @teststr = 'p_a3c_master';

    select

    @teststr

    where

    @teststr like '__[A-Za-z][A-Za-z][A-Za-z]%';

    set @teststr = 'p_abc_master';

    select

    ...

  • RE: Stored Procedures

    Regarding transactions, you can use SAVE POINTS to avoid ROLLBACK undoing all your work. You can do this to nest your transactions, and yet ensure that some of the...

  • RE: Extract day,month,year from the recorded data in a database

    Grant Fritchey (3/12/2009)


    You want to use the datepart function. You can look it up in BOL for all the permutations, but it basically works like this:

    SELECT DATENAME(yyyy,'3/12/2009') AS 'Year'

    Or:

    declare...

  • RE: Loop to update table

    Here is some test code for you to work with:

    create table #Temp (

    Column1 datetime,

    Column2 datetime null

    );

    insert into #Temp (Column1)

    select '2009-03-12 07:00' union...

  • RE: Issue with CTE

    Really comes down to six and half dozen the other. Personal experience on my system at home had fewer larger cross joins ran faster when I wanted millions of...

  • RE: Issue with CTE

    Bob Hovious (3/12/2009)


    there is no table definition or data that is relevant

    You are absolutely correct. When asking for more information, I just asked for complete text of errors,...

  • RE: backup with append option and restore

    Yes, you really should do each backup to a separate file. If you are appending backups to the same file you have to specify which file to restore from...

  • RE: Random 64 Characters alphanumeric String

    Here is another solution:

    with

    a1 as (select 1 as N union all

    select 1 union all

    select 1 union...

  • RE: backup with append option and restore

    Please post the code you used for both your backups and restores.

  • RE: time difference computation

    How are you looking for elapsed time to be returned? Not knowing your data, I don't know if I need to worry about elapsed time going over 24 hours...

  • RE: Issue with CTE

    siddartha pal (3/12/2009)


    I am not able to complie the function because of Varchar(max) for @string parameter.

    Not sure why that would give you a problem, you are using varchar(max) in your...

  • RE: Unique Constraint

    The other alternative put a where clause on your inserts that checks for the existance of those three values existing in the database already.

  • RE: Optimize delete statement

    You can also drop the NOLOCK hint. It is ignored any way on INSERT, UPDATE, and DELETE statements.

  • RE: Issue with CTE

    How about trying the following code:

    create function dbo.DelimitedSplit (

    @pString varchar(max),

    @pDelimiter char(1)

    )

    returns table

    as

    return

    with

    a1 as (select 1 as N union all

    ...

Viewing 15 posts - 22,036 through 22,050 (of 26,490 total)