Forum Replies Created

Viewing 15 posts - 346 through 360 (of 5,109 total)

  • Reply To: CAST(NULL AS varchar(1))

    Casting a literal NULL to a data type in a CASE is somewhat pointless; it'll be converted to the highest precedence data type of the non-NULL literals or column (which...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: Function to split string

    Goffr wrote:

    Jeff Moden, you mention what you built previously.  Did I overlook a code sample or link?

    Jeff would be referring to their very well known DelimitedSplit8k function, which also...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: Dropping and creating tables.

    ben.brugman wrote:

    Problem: Stored procedure and in a script the @parameters do not 'survive'

    Well no, but there were no parameters in your script, nor was it provided as a Procedure; I...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: SQL update to replace undetermined string value

    Assuming that if there is a *** to start a section, there is always a corresponding *** to end it, then I would actually use a could of CHARINDEXes in...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: Filling in Empty Rows

    If I am understanding what you appear to be describing, you could use a VALUES table construct:

    SELECT V.I,
    ISNULL(YT.YourColumn,0) AS YourColumn
    FROM...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: Dropping and creating tables.

    The problem is the parser here. You are attempting to create the same object twice in the same batch, and thus the parser sees the second attempt to create the...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: Can post please be stored in nvarchar?

    Hi Solomon,

    Sorry not replied to this, December wasn't a great month for me, so didn't have my head in the game. I'll have a look at this later this week...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: Can post please be stored in nvarchar?

    Solomon Rutzky wrote:

    If I can find what I saw at the time and pass along some suggested changes, could you help me test it? And if successful, I can post the...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: Can post please be stored in nvarchar?

    Thanks Solomon. It's bitterly disappointing that this was raised back in April of last year and not fixed yet; I didn't even think to look for a report and I...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: UTF8 and varchar lengths

    Jon 0x7f800000 wrote:

    Might be worth updating the question to use NCHAR to get the character. Code written in good old ASCII won't let you down 😉

    True, though one would expect SSC...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: UTF8 and varchar lengths

    I've edited the initial post, nothing I can personally do about SSC's data choices unfortunately.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: UTF8 and varchar lengths

    DesNorton wrote:

    On my SQL 2019 instance, the behaviour does not match your explanation

    LEN_REPLICATE

    Yep the question I wrote doesn't have a question mark in it, it had a...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: Add check length of column code before insert into table.

    Phil Parkin wrote:

    Thom A wrote:

    I assume all you need it this:

    LEN((DT_WSTR, 4) [Your Column]) == 4

    If the values can also be longer than 4 characters as well increase...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: Add check length of column code before insert into table.

    I assume all you need it this:

    LEN((DT_WSTR, 4) [Your Column]) == 4

    If the values can also be longer than 4 characters as well increase the length of...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Reply To: Are the posted questions getting worse?

    Lynn Pettis wrote:

    I almost started to answer this until I saw the /sarcasm tag you included.  Of course I have been up all night since I was sleeping on and off...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

Viewing 15 posts - 346 through 360 (of 5,109 total)