Forum Replies Created

Viewing 15 posts - 8,551 through 8,565 (of 8,731 total)

  • RE: Tsql procedure to mutiple rows if it has duplicate id

    I don't know if this helped the OP, but it sure helped me to learn more.

    Thank you guys.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Tsql procedure to mutiple rows if it has duplicate id

    After several runs (with consistent results) that might not be enough to prove something real. I found out that the explicit RBAR (from Paul) beated the hidden RBAR from Eugene....

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Tsql procedure to mutiple rows if it has duplicate id

    Paul,

    I'm curious. Why would you use a cursor?

    Shouldn't it give the worst performance? (at least in my tests it did)

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Tsql procedure to mutiple rows if it has duplicate id

    As posted before, you should give your sample data in a consumable format. This time was easy so I did it for you.

    I recommend you to read Jeff Moden's article...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: My Function should return selective part of String

    I might be wrong, but I believe it's not returning the first letter from each element (Declined returns 'R').

    I would do something like this:

    CREATE FUNCTION [dbo].[FnSplit_string]

    (

    @List nvarchar(max)

    )

    RETURNS table AS

    RETURN SELECT...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Add multiple users and give permissions to many databases

    Administration is not my forte, so you shouldn't take my advice as the only truth.

    But you can use something like this.

    declare @cmd1 varchar(500),

    @cmd2 varchar(500)

    set @cmd1 =

    'use ?;...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Add multiple users and give permissions to many databases

    I'm sorry, I got confused.

    If you're using Windows Authentication, you should create a Windows group and then create a Login for that group.

    That way, you can manage the permissions as...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Add multiple users and give permissions to many databases

    Have you tried making a server role and adding the logins to that server role?

    Or you could make a script to create the logins and give permissions.

    EDIT: Forget this post.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: evaluating and combining values from two rows

    The problem was on your conditions to choose the valid end_date.

    As it would become more and more complicated, I changed the way it was made. Try to understand what it's...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: how to remove zero from my string

    REPLACE( string, '0', '')

    Use the help or Books OnLine for SQL Server.

    http://msdn.microsoft.com/en-us/library/ms186862.aspx

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Update table based on column grouping

    A simple hint:

    If you manage to get the SourceCount correct, the rest will be easier.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Update table based on column grouping

    DerbyNeal (8/22/2012)


    I do have another query though...

    Any ideas please?

    Thanks in advance,

    I have an idea.

    Why don't you try to use the previous queries as example and show us what you...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Update table based on column grouping

    I'm not sure if this is the best approach or if you should divde the query for better performance, but as I said in my previous post: "It's an option"

    UPDATE...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Backup Compression Not Working on 2008 R2

    Check this, it's on the Restrictions part

    http://msdn.microsoft.com/en-us/library/bb964719(v=SQL.100).aspx

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Update table based on column grouping

    Could you post the desired output?

    I couldn't understand how you want it.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 8,551 through 8,565 (of 8,731 total)