Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    1

    Post Unanswered: Do not display the result of my long text string, approx about 400 characters

    I have the following problem. My SQL Query that i wrote works but the result that is displayed in Query analyzer cuts most of my long text that I want in my result. The long text string is approx about 400 characters and the type is varchar of the field. Any ideas??

    SELECT '510', PRODCLASSID
    , '1', COMPONENTID,'ENG'+SPACE(2),'#'+SPACE(254),'#'+SPAC E(254),'#'+SPACE(254),'#'+SPACE(99),externalid,
    'Desc1' = CASE
    WHEN SUBSTRING(externalid,1,2) = 'MF'
    THEN 'Full machine warranty : parts, labour, mileage and others covered at warranty rates applicable at the time of repair. '
    WHEN SUBSTRING(externalid,1,2) = 'MP'
    THEN 'Full machine warranty, parts only : parts covered at warranty rates applicable at the time of repair. '
    WHEN SUBSTRING(externalid,1,2) = 'PF'
    THEN 'Power line warranty : parts, labour, mileage and others covered at warranty rates applicable at the time of repair. '
    WHEN SUBSTRING(externalid,1,2) = 'PP'
    THEN 'Power line warranty, parts only : parts are covered at warranty rates applicable at the time of repair. '
    END
    +
    CASE
    WHEN SUBSTRING(externalid,LEN(externalid)- 3,4) = '2018'
    THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 18 month or 2000 HRS, whichever comes first. '
    WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '3024'
    THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 24 month or 3000 HRS, whichever comes first. '
    WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '4030'
    THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 30 month or 4000 HRS, whichever comes first. '
    WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '5036'
    THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 36 month or 5000 HRS, whichever comes first. '
    WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '6042'
    THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 42 month or 6000 HRS, whichever comes first. '
    WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '8054'
    THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 54 month or 8000 HRS, whichever comes first. '
    WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '1074'
    THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 74 month or 10000 HRS, whichever comes first. '
    END
    + 'Flexible warranty is handled according to the procedures described in ESPPM 3-10.'
    +
    CASE

    WHEN prodclassid IN ('P1','P11','P8','P9')
    THEN ' (mileage limited to 300 km)'
    WHEN prodclassid IN ('P7')
    THEN ' (mileage limited to 200 km)'
    ELSE NULL
    END
    +
    SPACE(5000 - LEN('Desc1'))
    .......

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If you are using the MS Query Analyzer from the SQL 2000 Client Tools, you can set the maximum column length. Select Tools | Options | Results and the length control is near the middle of the sheet.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •