Forum Replies Created

Viewing 15 posts - 31 through 45 (of 95 total)

  • RE: Are the posted questions getting worse?

    ThomasRushton (12/11/2015)


    Steve Jones - SSC Editor (12/11/2015)


    Take this week's survey. don't look anything up, first thing that comes to mind. Be serious, not silly.

    https://www.surveymonkey.com/r/JGFCKDW

    #10? Really? Why not just...

  • RE: Are the posted questions getting worse?

    BrainDonor (10/9/2015)


    I've just about completed an article for publication on SSC, describing the behaviour of explicit transactions and would appreciate it if a couple of people could cast their eyes...

  • RE: Column aliases

    3 or 9 depends how you define different...

    column AS alias

    column AS 'alias'

    column AS [alias]

    column alias

    column 'alias'

    column [alias]

    alias = column

    'alias' = column

    [alias] = column

    And I didn't use double quotes.

    I only lost...

  • RE: convert date format from mmddyy to yyyy-mm-dd hh:mm:sec

    If the source is always a 6 character string:

    Rearrange the input to a yymmdd string with two substrings.

    Convert to date using CONVERT using style 12 (yymmdd)

    DECLARE @D nvarchar(6) = '083115'

    SELECT...

  • RE: Insert without a PK

    After running the first script the table has 2 indexes, A unique non-clustered on SalesId (PRIMARY KEY) and a clustered on SalesId.

    The first insert inserts one row, the second fail...

  • RE: RTRIM is not working as expected

    A Scaler function that trims leading and trailing spaces from a Unicode string.

    dbo.Numbers is a Tally-table.

    CREATE FUNCTION dbo.fn_NTRIM(@T nvarchar(4000))

    RETURNS nvarchar(4000)

    AS

    BEGIN

    DECLARE @r nvarchar(4000);

    WITH cte_Space (UC) AS (

    SELECT UC

    FROM(

    VALUES(0x20),--Space

    (0xA0),--No-Break...

  • RE: RTRIM is not working as expected

    12288 is the Unicode character 'IDEOGRAPHIC SPACE' (0x3000),

    Added to my list of Unicode-spaces... which I use in my front-end to cleanup any copy-paste strings..

  • RE: RTRIM is not working as expected

    SQL 2008R2 Collation SQL_Latin1_General_CP1_CI_AS

    Could also be a difference in regional settings..

    s(No column name)(No column name)dump

    32320x2000

    G712880x2001

    ?635440x2002

    ?638000x2003

    3281920x0020

    3281930x0120

    3281940x0220

    3281950x0320

  • RE: RTRIM is not working as expected

    The Unicode space-characters 32 and 0x2000 to 0x2003 return an ASCII value of 32.

    RTRIM only trims Unicode character 32.

    If a string ends with NCHAR(0x2000) RTIM will not remove the last...

  • RE: RTRIM is not working as expected

    Changed my code to show the effects better

    DECLARE @test-2 TABLE (SpaceChar nvarchar(1), Name nvarchar(50) );

    INSERT @test-2

    VALUES(CHAR(32), 'Space'),

    (NCHAR (0xA0),'No-Break Space' ),

    (NCHAR(0x2002),'En Space'),

    (NCHAR(0x2003),'Em Space'),

    (NCHAR(0x2004),'Three-Per-Em Space'),

    (NCHAR(0x2005),'Four-Per-Em Space'),

    (NCHAR(0x2006),'Six-Per-Em...

  • RE: RTRIM is not working as expected

    In Unicode there are more Space-Characters than ASCII(32)

    You can use UNICODE(Char) to get the Unicode value for the space-character.

    Run the following code to see the (known to me) space-Characters in...

  • RE: VB.Net - Changing a Label's Text Property

    If you have any other questions, please ask, I might give you an answer.

    For the last 8 years I've been developing a ERP system in VB.Net and SQLServer.

    Louis.

  • RE: VB.Net - Changing a Label's Text Property

    You can use the My.Setting object,

    Set value : My.Settings("UserName") = varUserName

    Save: : My Settings.Save

    See https://msdn.microsoft.com/en-us/library/saa62613.aspx

    Louis.

  • RE: Drop Database

    DROP DATABASE deletes the physical disk files used by the database when they are online,

    sp_detach_db only removes the database from the current (SQL) server by leaves these files on...

  • RE: Strange rounding issues

    The precision and scale of the result are calculated ( see https://msdn.microsoft.com/en-us/library/ms190476.aspx

    look especially as this comment:

    The result precision and scale have an absolute maximum of 38. When a result precision...

Viewing 15 posts - 31 through 45 (of 95 total)