Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Truncated Values
Message
De
19/09/2007 21:14:48
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01255529
Message ID:
01255654
Vues:
15
This is what I used when there was one field:
PADR(TRANSFORM(InsCarr.CarName, '@T'), 30, ' ')
But now I'm getting truncated values in the individual fields in this SQL:
TRANSFORM(Patient.PCare_Phy, '@T') + '^' + TRANSFORM(RefProv.LAST, '@T') + '^' + TRANSFORM(RefProv.FIRST, '@T')
Do I have to pad each one? I'm sure I do, but what I really need is the trimmed values in the resulting field. Like "000001^Johnson^Donald" not "000001^Johnson ^Donald " if that made sense (I typed 5 spaces before the "^" but the UT parser ignored 4 of them).


>Pad whole expression not part of it
>PADR(TRANSFORM(InsCarr.CarName, "@T") + '|', 30) AS InsuranceCarrierName,
>
>
>>I'm getting truncated values in the InsuranceCarrierName fields. I know why this is happening, the old whatever the first record's length is, then that's all you get for the rest. I added the PADR to get it all, but I really need the spaces trimmed between the field's value and the '|" character. How do I get around this?
>>
>>
>>SELECT ;
>>	TRANSFORM(InsCarr.InsCarr, "@T") + '|' AS InsuranceCarrierID, ;
>>	PADR(TRANSFORM(InsCarr.CarName, "@T"), 30, ' ') + '|' AS InsuranceCarrierName, ;
>>	IIF(Covr.CvPs == 'P', 'Primary', IIF(Covr.CvPs == 'S', 'Secondary', IIF(Covr.CvPs == 'T', ;
>>		'Tertiary',''))) AS InsuranceCoverage ;
>>	FROM Covr ;
>>	JOIN InsCarr ON InsCarr.InsCarr == Covr.CvCarr ;
>>	WHERE ;
>>		Covr.Pat_No = m.PtPn ;
>>		AND BETWEEN(DATE(), Covr.Eff_Date, EVL(Covr.Exp_Date, DATE(9999,12,31))) ;
>>	INTO CURSOR (ADT_IN1)
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform