Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View definition has been changed
Message
 
 
To
30/10/2007 10:29:05
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01265020
Message ID:
01265049
Views:
15
You have at least 2 fields with expresions that could return variable size strings. You have to wrap them into PADR() to make sure that size is always the same regardless of the data in the table.
       iif(OD.lCresting,iif(OD.nCrest_Sty = 1,"Oval","Emb."),"    ") as cCrest_Sty  ,;
       trim(PLS.cDescrip)+iif(G.cStyle="P","x"+trim(PLL.cDescrip),"") as cSize       ;
>Here's the view:
>create sql view lv_OrdDet as      ;
>select OD.kOrder, OD.iQty, OD.nPrice, OD.lCresting, OD.lCrest_ch, OD.nCrest_Prc     ,;
>       OD.nCrest_Sty, OD.kPeople, G.cMaterial, G.nDefPrice, G.nCst_Mat, OD.kOrderDet,;
>       P.cName, O.kLoc, PLC.cDescrip as Color, PLC.cAbrev, G.cStyle, G.cDescrip     ,;
>       iif(OD.lCresting,iif(OD.nCrest_Sty = 1,"Oval","Emb."),"    ") as cCrest_Sty  ,;
>       iif(OD.lChg4Add, OD.nCrest_Prc, 0.00) as nCrest_Chg                          ,;
>       (OD.nPrice + iif(OD.lChg4Add, OD.nCrest_Prc, 0.00)) * OD.iQty as nTotPrice   ,;
>       trim(PLS.cDescrip)+iif(G.cStyle="P","x"+trim(PLL.cDescrip),"") as cSize       ;
>  from OrderDet OD                ;
> right join Orders O              ;
>    on OD.kOrder = O.kOrder       ;
>  left join People P              ;
>    on OD.kPeople = P.kPeople     ;
>  left join PickList PLC          ;
>    on PLC.kPickList = OD.kColor  ;
>  left join PickList PLS          ;
>    on PLS.kPickList = OD.kSize   ;
>  left join PickList PLL          ;
>    on PLL.kPickList = OD.kLength ;
>  left join Garments G            ;
>    on G.kGarment = OD.kGarment   ;
> where O.kOrder = gkOrder         ;
> order by G.cStyle, P.cName
>It doesn't reference anything with a variable length index.
>
>It failes after being run with nCrest_Chg calculated as a zero value, and then requeried with a non-zero calculated value for nCrest_Chg. It's on this that I have been focusing, but now am looking for something more general as I've hit a dead end.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform