Forum Replies Created

Viewing 15 posts - 2,491 through 2,505 (of 8,761 total)

  • RE: Are the posted questions getting worse?

    GilaMonster (1/11/2017)


    I really would like to attend Bits this year (hint, hint)

    Got it 😉

    😎

  • RE: How to write a string to a file in SQL.

    ben.brugman (1/10/2017)


    Hello All,

    I want to write a varchar(max) string to a file.

    The file should be UTF-8 (and not in a multi byte character format).

    Thanks for your time and attention,

    Ben

    You will...

  • RE: Date logic

    Quick thought, you can probably simplify the calculation, something like this maybe?

    😎

    INSERT INTO @Sample

    SELECT '2017-01-07 07:28:01.917',1 UNION ALL

    SELECT '2017-01-07 07:28:05.210',1 UNION ALL

    SELECT '2017-01-07 14:06:21.840',1 UNION ALL

    SELECT '2017-01-07 14:06:24.227',1 UNION ALL

    SELECT...

  • RE: Performance tuning for a query

    mishrakanchan86 (1/9/2017)


    Hi ALl

    I have a view which looks something like below.

    Select

    * from T1 with(NoLock)

    Inner Hash Join T2 With (NoLck) on T1.PID = T2.PID

    Inner Hash Join...

  • RE: Remove certain characters from a string

    ocean3300 (1/6/2017)


    Thanks for the ideas and codes.

    I have another question.

    Let's say I have a string something like below:

    test-asdasdasd="xxx"

    If I want to replace asdasdasd="xxx" with blank ('') so that I...

  • RE: syntax error

    spectra (1/6/2017)


    Thanks....This worked excellent.

    You are very welcome

    😎

  • RE: syntax error

    spectra (1/6/2017)


    There is syntax error in the code.

    Incorrect syntax near 'id='.

    INSERT INTO LOG_RATE_MONTH(LOG_MESSAGE,LOG_DATE)('id='+@_prev,getDate());

    @_prev is a sql variable

    whats the issue in this code ?

    Missing the VALUES keyword

    😎

    INSERT INTO LOG_RATE_MONTH(LOG_MESSAGE,LOG_DATE) VALUES('id='+@_prev,getDate());

  • RE: Remove certain characters from a string

    Here is a quick solution that uses the dbo.DelimitedSplit8K function[/url]. Note that for this to work, the values cannot contain spaces!

    😎

    DECLARE @Text VARCHAR(256) = 'Generic="abcde" Generic="fghij" Generic="sdfsdfasdf"';

    SELECT

    ...

  • RE: Help with XML Splitter De-entitization, please.

    Just for fun, here is a JSON based splitter, nasty fast but not fully tested, SQL Server 2016 and later.

    😎

    CREATE FUNCTION dbo.ITVFN_SPLIT_STRING_JSON

    (

    @INPUT_STRING NVARCHAR(MAX)

    ,@DELIMITER...

  • RE: Restoration takes too long

    sosbgenius20 (1/5/2017)


    Hi all.

    In my office we are using MS sql server 2008r2.

    We have a backup files but one of the files takes too long to be restored. Approximately it...

  • RE: Username increment by 1 if already exists in table

    Can you post the accumulated business rules please?

    😎

  • RE: Are the posted questions getting worse?

    GilaMonster (1/4/2017)


    Repost from Twitter:

    Research for a blog post: What are the common forms of 'catch-all' / 'multi-parameter query' you've seen?

    I've seen:

    (Col = @C1 or @C1 is NULL)

    Col =...

  • RE: Conditional Join

    Why don't you use left outer join?

    😎

  • RE: File Upload

    VastSQL (1/3/2017)


    Thanks Guys.

    The file is uploaded to application server itself initially and then data gets inserted into multiple tables once the validation is complete. The validation checks in many tables...

  • RE: Want to populate Col B (Datetime) from last 10 characters of Col A (nvarchar)

    JaybeeSQL (1/2/2017)


    Hi all,

    Got a bunch of date data in the wrong column, I'd like copied into a column on the same table. Here's as far as I've got:

    Update...

Viewing 15 posts - 2,491 through 2,505 (of 8,761 total)