Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Thanks a lot Vlad, (You don’t sleep?)
I thought that the Val function would do the trick of getting exact size results.
Regards
Oscar Corte
>Hi!
>
>When view is built, VFP preview it just by running the query for it. When view returns no result, what field type should get VFP for the value debem and haberm? Also, these fields should have the same length across the entire query result, otherwise you will get such errors. It is good idea to change the expressions for these fields to something like following:
>
>PADR(IIF(C108.haber,VAL("0000000000000000.0000"),C108.monto),25) AS debem,;
>PADR(IIF(C108.haber,C108.monto,VAL("0000000000000000.0000")),25) AS haberm,;
>
>And in the view designer open the field properties dialog box, select these expression fields and set their field type to C(25).
>
>HTH.
>
>
>>I’ve created a view based on the next SQL statement:
>>
>>SELECT C101.no, C101.cuenta,;
>> IIF(C108.haber,VAL("0000000000000000.0000"),C108.monto) AS debem,;
>> IIF(C108.haber,C108.monto,VAL("0000000000000000.0000")) AS haberm,;
>> C108.ic101;
>> FROM aca!c107 INNER JOIN aca!c108;
>> INNER JOIN aca!c101 ;
>> ON C108.ic101 = C101.ic101 ;
>> ON C107.ic107 = C108.ic107;
>> WHERE C107.fecha >= {01/07/2001};
>> AND C107.fecha <= {31/07/2001};
>> AND C101.no >= "1 ";
>> AND C101.no <= "1103-014-002 ";
>> GROUP BY C108.ic101
>>
>>It works ok at preview, buy when I open with the nodata argument:
>>
>>use Myview nodata
>>
>>an then requery(), I get error 1494 “Table definition has changed”.
>>
>>The error started to happen when I added the filter conditions for table c101:
>>C101.no >= "1 ";
>> AND C101.no <= "1103-014-002 "
>>
>>Any hints about what is happening are appreciated.
>>
>>Thanks in advance and regards.
>>
>>Oscar Corte
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement