Forum Replies Created

Viewing 15 posts - 121 through 135 (of 191 total)

  • RE: Replace-Function

    RonKyle - Wednesday, August 15, 2018 7:29 AM

    We use the nested replaces to remove non-printable characters that sometimes get into the source...

  • RE: Replace-Function

    Here a version, which uses selfreferencing CTEs:

    CREATE TABLE dbo.synonym (synonym VARCHAR(50) NULL, word VARCHAR(50) NULL, sort_order INT PRIMARY KEY);
    INSERT INTO dbo.synonym (synonym, word, sort_order)
    VALUES...

  • RE: Replace-Function

    In my opinion this is a very bad script.
    - Scalar functions (as those) are very slow
    - creating a table variable (since you can't use #temp-tables inside a function)...

  • RE: Verifying the restore

    The whole, valid command would be (plus maybe some with-options)
    RESTORE VERIFYONLY FROM DISK='\\SERVER1\Backup\my_big_db\FULL\SERVER1_my_big_db_FULL_20180803_210600.bak'

    Sorry, but checking the disk space does not make any sense, since I do...

  • RE: All the memory

    Question: why does Windows want / need more free space for itself on systems with more RAM than on systems with lesser?

    The "core" of Windows should need...

  • RE: State v Migrations

    I see, what you mean - when developer A works on a procedure for 4 days and developer B makes a small change (e.g. a new column or fixing a...

  • RE: State v Migrations

    An important point, when working with own migration scripts, is defensive scripting. Do not just create a table, but check, if the table already exists before. The same with columns...

  • RE: Better Comments

    I used to comment every line of code, when I wrote scripts for the game Heroes of Migth and Magic 3 (WoG), but mostly, because it had a very "uncommon"...

  • RE: UNION and Duplicate values

    it depends :-), but both queries could return different results when are used with real tables.

    Your  first query (with UNION ALL) could return duplicates, when you have the...

  • RE: Filtering a CAST

    Nice question, but when you use country specific date / time conversion, you should always add a SET language = 'englisch' to the query.

    On my German SQL Server...

  • RE: Performance of GROUP BY multiple columns

    You are right about the missing OVER() in the third query - sorry, my fault,

    On the other side the execution plans for query one and two are not...

  • RE: Default CONTEXT_INFO()

    This is a little inconsistency, since you can't set CONTEXT_INFO to NULL.
    DECLARE @ci VARBINARY(128) = CONTEXT_INFO();
    --<do some stuff as temporary setting CONTEXT_INFO to something else>
    SET...

  • RE: Decouple the Tools

    I'd guess that there are a lot of small and big shops out there, which uses bcp and sqlcmd regulary (e.g. bcp for simple import / export tasks where SSIS...

  • RE: JSON performance

    Another problem: JSON could be stored in a (N)VARCHAR(MAX) field which could not be added to an index (only included, but this would only allow full index scans, even if...

  • RE: Adaptive Query Processing – Batch Mode Memory Grant Feedback

    What happens, if you call the procedure again with an ID which has only one entry (so that the granted memory is now much to high)? Will it lower the...

Viewing 15 posts - 121 through 135 (of 191 total)