Forum Replies Created

Viewing 15 posts - 1,471 through 1,485 (of 6,036 total)

  • RE: Xp_cmdshell

    Create a job which will be recording status of xp_cmdshell into a table, say, every minute and enable it after each recording.

    Analysing the records you may be able to figure...

  • RE: Intermittent poor query performance

    cunningham (3/28/2016)


    Well I have all but ruled out resource contention on account of the differing number of reads, as well as some comparisons I have made re resource usage. Pretty...

  • RE: Storing encypted SSN's

    ram302 (4/26/2016)


    I will never need to decrypt the SSN, but I will need to add/remove ones as personnel are hired/terminated. Also, the table itself may contain multiple entries for one...

  • RE: strange problem with varchar(8000) getting cut at 4000 characters

    Jeffery,

    I made the following script from the pieces you've posted:

    DECLARE @BatchIDas int

    ,@PreparedStatementas varchar(8000)

    ,@SourceServerName NVARCHAR (128)

    ,@SourceDBName NVARCHAR (128)

    ,@SourceSchemaName NVARCHAR (128)

    ,@PKTableName NVARCHAR (128)

    ,@Alias NVARCHAR (128)

    , @PKColumnName NVARCHAR (128)

    ,@FKColumnName NVARCHAR (128)

    ,@ETLMappingIDAS int

    ,@SQL1as...

  • RE: strange problem with varchar(8000) getting cut at 4000 characters

    Sorry, cannot see where did you answered this:

    Does PRINT LEN (@preparedStatement) return >4000 ever?

    Do you actually submit lengthy string to the UPDATE?

  • RE: Case Statement in Order By

    BSavoie (4/27/2016)


    Thanks for the response SSCertifiable. The order by also needs to choose the greater of AddDt & UpdateDt. I'll definitely try and get the nullability squared away.

    As you said,...

  • RE: Case Statement in Order By

    BSavoie (4/26/2016)


    Only if there's a bug in the code.

    Considering, ORDER BY clause is not the place where we fix bugs (if you cannot rely on quality of the code, a...

  • RE: strange problem with varchar(8000) getting cut at 4000 characters

    Jeffery Williams (4/26/2016)


    In morning i can get to it. But count on the following

    Set @preparedStatement = @preparedStatement + ' ' + @sql1...

  • RE: strange problem with varchar(8000) getting cut at 4000 characters

    Can you post the full UPDATE statement?

    Conversion could be caused by anything:

    CASE, ISNULL, concatenation with NVARCHAR, etc.

    Actually, inspect the execution plan - you may find where implicit conversion is...

  • RE: Case Statement in Order By

    Logically - can UpdateDt be possibly less than AddDt?

  • RE: Does T-SQL have a means of iterating over the columns of a table?

    Rod at work (4/26/2016)


    We've got to capture the history of a record, when its updated or deleted. If this were a C#/VB.NET app then we could iterate using a FOREACH...

  • RE: Non clustered Column store index

    Grant Fritchey (4/26/2016)


    One point on that, I have found that even with small data sets (10s of thousands of rows), columnstore can benefit aggregate queries in a marvelous way. Giant...

  • RE: Strange Performance Issue

    davidlester.home (4/25/2016)


    I have not been able to get an execution plan out of the query now that it is slow, 11+ hour run time is making it difficult to say...

  • RE: Why have HEAPS?

    Bhushan Kulkarni (4/25/2016)


    Staging tables can be heap apart from tables storing configuration data which is very less in size.

    I once saw a configuration data table which was occupying > 6GB...

  • RE: Eliminating NULLs when selecting from potentially several tables

    Thanks for posting the script.

    You may not need many views from the same table.

    Will a view like this work for you?

    CREATE VIEW dbo.PersonProfile

    AS

    SELECT t.PersonID, 'Degree', t.Degree

    FROM dbo. t

    WHERE t.Degree...

Viewing 15 posts - 1,471 through 1,485 (of 6,036 total)