Forum Replies Created

Viewing 15 posts - 1,981 through 1,995 (of 8,731 total)

  • RE: Concurrency - Please Provide Comments

    The reason for the CTE was to include the ORDER BY which isn't available in the simple 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: Error Handling and Check Constraints

    Check constraints will validate that data in a table follows certain rules.

    Error handling will prevent errors from crashing a process by giving the option of following an alternate path if...

    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: Pass table variable to exec SQL Server

    Thank you for the feedback.

    I hope that you noticed the change in the table name. I also hope that you understand the solution and how does it work.

    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 do I install the Adventureworks database ? - TSQL

    I was just going to mention that folder. I'm glad that you were able to attach the db successfully.

    Remember that SQL Server has different credentials than your user account. That'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: Concurrency - Please Provide Comments

    That's great. Thank you for the feedback.

    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: Pass table variable to exec SQL Server

    Try changing your code to this, there's no need for all that dynamic code:

    DECLARE @colsUnpivot AS NVARCHAR(MAX);

    DECLARE @query AS NVARCHAR(MAX);

    DECLARE @Table_Name as Varchar(200);

    DECLARE @transaction_Table NVarchar(500);

    SET @Table_Name =...

    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: Next Identity needed

    What's the result from this query?

    SELECT t.name, c.name, c.is_identity

    FROM SCCOE_Order_Progression.sys.columns c

    JOIN SCCOE_Order_Progression.sys.tables t ON c.object_id = t.object_id

    JOIN SCCOE_Order_Progression.sys.schemas s ON t.schema_id = s.schema_id

    WHERE s.name = 'dbo'

    AND t.name = 'ATTU_Sales_organization'

    AND c.name...

    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 do I install the Adventureworks database ? - TSQL

    What's the result if you run this?

    SELECT @@VERSION

    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: Data Types issue?

    It's not including only values from 8.0 to 9.9. It's also not comparing ASCII values.

    It's ordering the values as a dictionary would do (but with more characters) and the order...

    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: Parameter on Powershell Script

    Brandie Tarvin (10/25/2016)


    trangen1 (10/25/2016)


    what do you mean????? "The code below clears the Local Servers Group completely (be aware of this),"???

    can I run it without this clearing of the LSG????

    'dir -Recurse...

    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: Concurrency - Please Provide Comments

    READ COMMITTED should be enough. I would test, though.

    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: Concurrency - Please Provide Comments

    Why not do it at once instead of using a variable?

    CREATE PROCEDURE dbo.GetNextId @Col1 INT

    AS

    SET NOCOUNT, XACT_ABORT ON;

    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

    ...

    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: Are the posted questions getting worse?

    Should I be concerned for this person's info?

    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: Next Identity needed

    SQL Server will assign the value automatically. Are you sure that the column has the identity property assigned correctly?

    At first, I thought another possibility would be having SET IDENTITY_INSERT ON,...

    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: function to clean a phonenumber

    Functions in SQL don't perform tasks. Functions return values, that's their main purpose in any language.

    To perform a process, you need a stored procedure. To update the values in a...

    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 - 1,981 through 1,995 (of 8,731 total)