Forum Replies Created

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

  • RE: Real to Float

    Jacob Wilkins (8/12/2015)


    These questions are always fun, since I have to do some playing with binary representations to make sure I fully understand what's going on. Fortunately in this case...

  • RE: Print a nvarchar variable

    briankwartler (8/11/2015)


    And for those of you who are wondering why LEN(@SQL) is 48,893 it's because

    LEN(', CONVERT(VARCHAR(10), CAST(1 AS INT )) as ABC') is 47 and there are 9 single-digit...

  • RE: Print a nvarchar variable

    Toreador (8/11/2015)


    "however, you have to append in increments with each increment less than or equal to 4000"

    Not true.

    declare @test-2 nvarchar(max) = ''

    select @test-2 =

  • RE: Float to Varchar

    rmechaber (8/10/2015)


    Yeah, well, be careful using STR() to convert from FLOAT to VARCHAR(), too:

    http://www.sqlservercentral.com/questions/T-SQL/94788/[/url]

    Rich

    Good example on STR() usage.

  • RE: Float to Varchar

    jan.dewettinck (8/9/2015)


    Thanks for the question

    Not sure if the following link provides a better explanation.

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

    I based my answer on the part about the style which says that the...

  • RE: CURSOR LOOP

    Ed Wagner (8/5/2015)


    andrea4618 (8/5/2015)


    tom.w.brannon (8/5/2015)


    Toreador (8/5/2015)


    Didn't even notice the position outside the While loop. The fact that the variable is set to 1 on the previous line means that even...

  • RE: SELECT @local_variable

    Scott-144766 (8/4/2015)


    Or you might get

    Msg 208, Level 16, State 0, Line 7

    Invalid object name '#values'.

    if you have the misfortune to be working on a case-sensitive database.

    Awww!! Good point to...

  • RE: Global temporary table visibility

    Nice question and good explanations thereafter.

  • RE: how to update values based on column into multiple columns in another table

    Jason A. Long (7/31/2015)


    Try this...

    UPDATE h SET

    h.CHANNEL1 = vc.C1,

    h.CHANNEL2 = vc.c2

    FROM

    #Hori h

    JOIN (

    SELECT

    v.FILTER,

    MAX(CASE WHEN v.CHANNEL = 1 THEN v.VALUE END) AS C1,

    MAX(CASE WHEN v.CHANNEL = 2 THEN...

  • RE: how to update values based on column into multiple columns in another table

    Luis Cazares (7/31/2015)


    I'm just wondering why would you need to update these columns as you shouldn't store values this way if you want a normalized table. And if this is...

  • RE: SELECT @local_variable

    Sean Lange (7/29/2015)


    Just make sure that when you use TOP you also use an ORDER BY. Otherwise it is rather pointless. 😉

    I agree Sean, and this is a way to...

  • RE: SELECT @local_variable

    SqlMel (7/29/2015)


    I ALWAYS use Top 1 when assigning values to variables even though in all cases I can think of I use a where clause that is supposed to return...

  • RE: NOT IN

    sestell1 (7/28/2015)


    This behavior is a lot easier to understand if you think about NOT IN as a series of 'not equal' statements logically ANDed together:

    Perfect way to restate the original...

  • RE: Visualizing in Space

    DIKW flashed on my mind after reading this. Data is a fact. When you ask data 'What', you get information. When you ask 'how', you acquire knowledge. When you ask...

  • RE: Create a Comma Delimited CSV File from Any Table/View with Debugging

    Good One Paul. I am tweaking little to bit export it from table to excel file. Will post here once I am successful.

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