Home Forums SQL Server 2008 SQL Server Newbies Concatenation of three fields with conditional parenthesis around last two fields for a field in a View RE: Concatenation of three fields with conditional parenthesis around last two fields for a field in a View

  • Quick followup to the random parens.

    MSAccess is using the SQL Server Native Cleint 11.0 to provide linked tables.

    On the MSAccess side the empty Date (that are really Characters to denote a schedule) all show up as Null.

    On the SQL Server side the empty fields using a Len function shows up as either 0 Len or NULL.

    The 0 Len data failed the ISNULL T-SQL and did what it was suppose to do - display the parens.

    Realizing this, I can update all of the 0 Len Character fields to NULL and this solution works perfectlly.

    This might be of interest to anyone using AZURE with a front-end that links with the standard SQL Server Native Client 11.0

    The solution above solved my problem. It also helped me solve a problem nobody realized existed until we needed the code.

    Thanks so much!

    Next time, I promise to include the create table with sample data!