Forum Replies Created

Viewing 15 posts - 706 through 720 (of 1,479 total)

  • RE: Sub Query returning multiple rows for particular inputs

    It means that one of the queries inside the isnull function returns more then 1 value, which is not allows. Here is a small demonstrations of the subject:

    --returns an...

  • RE: Passing a List/Array Parameter to Procedure

    SQL Server has no arrays or lists. You can try sending it as XML and then use Xquery to get the values that were sent. Another alternative is...

  • RE: To Encrypt all stored procedures in a database.

    Saravanan T (1/7/2010)


    Hi all,

    To Encrypt all stored procedures in a database.

    Regards,

    Saravanan

    Is there any question in this statement? If there is can you try to explain...

  • RE: T-SQL Output Clause

    jinesh.i (1/7/2010)


    Hi,

    When I tried

    DECLARE @Table TABLE

    (

    Matrix_User_ID INT --PRIMARY KEY IDENTITY(1,1)

    ,OldFirst_Name VARCHAR(20)

    ,NewFirst_Name VARCHAR(20)

    )

    BEGIN TRAN

    UPDATE MSTR_User

    SET First_Name=UPPER(First_Name)

    OUTPUT inserted.Matrix_User_ID,deleted.First_name,inserted.First_name INTO @Table

    WHERE Matrix_User_Id =1294

    SELECT * FROM @Table

    ROLLBACK TRAN

    SELECT * FROM @Table

    It returned row...

  • RE: User Permissions on a particular table

    Sanz (1/6/2010)


    Yes.. Tried that but it returns the following message...

    Msg 15330, Level 11, State 1, Procedure sp_helprotect, Line 291

    There are no matching rows on which to report.

    Correct me...

  • RE: User Permissions on a particular table

    Did you try using sp_helprotect?

    Adi

  • RE: T-SQL Output Clause

    VALEK (1/6/2010)


    The question is trying to test the knowledge of temp tables with TSQL transactions, and does it very badly.

    There is not enough information.

    You should not require any database...

  • RE: T-SQL Output Clause

    I’m sorry, but this question is not a good one. With the information that we got from the question, there is no way that can know how many...

  • RE: Scope of a variable

    Dave Ballantyne (1/5/2010)


    SQLServer doesnt destroy the variable when it drops out of scope, for instance this works

    declare @l integer

    select @l = 1

    while(@l<10) begin

    declare @x integer

    ...

  • RE: DB Copy and account matching

    You can check it with the procedure sp_change_users_login (you can read about it in BOL). If the needed logins don’t exist in the new database, you’ll need to create...

  • RE: Scope of a variable

    Personally I have to admit that I’m surprised that you don’t get a run time error saying that you are declaring a variable that was already declared. I guess...

  • RE: isdate function

    This is what it means, but this is because January first 1952, is out of range for both smalldatetime and datetime data types, while January first 1953 is not out...

  • RE: create trigger for two case !?

    Personally, I’d do it in 2 different triggers because I’m doing completely different actions in both scenarios. Having said that, you can create 1 trigger and check if the...

  • RE: isdate function

    Notice that using the IsDate function has some issues. Sometimes it can lead to surprising results as you can see from the small script bellow:

    if isdate(1752) = 1

    select convert(datetime,...

  • RE: Query Issue with Date Between Spanning 2 Years

    This is because your function is returning a string instead of datetime (or smalldatetime). You should return a datetime datatype and compare it to your dates.

    One...

Viewing 15 posts - 706 through 720 (of 1,479 total)