Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unexpected concatenated fields
Message
De
12/03/2003 06:22:23
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Unexpected concatenated fields
Divers
Thread ID:
00764678
Message ID:
00764678
Vues:
44
In the following expression
the field returned is truncated unexpectedly to 120 characters long.
CAST(LEFT (RTRIM(dbo.[section].sect_desc), 25) + ' / ' + LEFT (CAST(dbo.heading.head_desc AS VARCHAR), 25) + ' / ' + 
LEFT (CAST(dbo.item.item_desc AS VARCHAR), 25) + ' / ' + LEFT (RTRIM(CAST(dbo.subitem.sub_desc AS VARCHAR)), 50) AS varchar(600))
Here is the complete select expression

Just to confuse things a bit further I just ran the view from VFP.
when I did a DISP STRUCTURE to see the length of this field VFP reported that the field
length was 175 characters, but everything within was truncated to 120 characters.
SELECT     dbo.rateband.pk_rateband, dbo.contract.cont_desc, dbo.rateband.schedkey + '/' + dbo.rateband.rateband AS Expr1, 
                      dbo.contract.contract + dbo.[section].[section] + dbo.heading.heading + dbo.item.item + dbo.subitem.subitem + '/' + dbo.rateband.rateband AS test, 
                      CAST(LEFT(RTRIM(dbo.[section].sect_desc), 40) + ' / ' + LEFT(CAST(dbo.heading.head_desc AS VARCHAR), 40) 
                      + ' / ' + LEFT(CAST(dbo.item.item_desc AS VARCHAR), 40) + ' / ' + LEFT(RTRIM(CAST(dbo.subitem.sub_desc AS VARCHAR)), 50) AS varchar(600)) 
                      AS short_desc, dbo.[section].[section], dbo.[section].sect_desc, dbo.heading.heading, dbo.heading.head_desc, dbo.item.item, dbo.item.item_desc, 
                      dbo.subitem.subitem, dbo.subitem.sub_desc, dbo.rateband.rateband, dbo.rateband.rate_desc, dbo.rateband.unit
FROM         dbo.rateband INNER JOIN
                      dbo.subitem ON dbo.rateband.pk_subitem = dbo.subitem.pk_subitem INNER JOIN
                      dbo.item ON dbo.subitem.pk_item = dbo.item.pk_item INNER JOIN
                      dbo.heading ON dbo.item.pk_heading = dbo.heading.pk_heading INNER JOIN
                      dbo.[section] ON dbo.heading.pk_section = dbo.[section].pk_section INNER JOIN
                      dbo.contract ON dbo.[section].pk_contract = dbo.contract.pk_contract
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform