• Or you could construct a query against your table as follows to check total actual string lengths for both scenarios.

    Assume the column (Your_Column) in your table (YourTable) is VARCHAR(100):

    SELECT VARCHAR=SUM(2 + CAST(DATALENGTH(ISNULL(Your_Column,'')) AS BIGINT))

    ,CHAR=SUM(CAST(100 AS BIGINT))

    FROM YourTable

    There's probably also information on this in the sys tables but I don't recall the details.

    Edit: Note that this is only an estimate as I'm not 100% sure that NULL values take up the 2 byte length specifier.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St