Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help about Where Clause
Message
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 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01012198
Message ID:
01012719
Vues:
28
Hi Sergey

Yes, I clarify the problem.

My table has i.e the above structure:
==============================
CREATE TABLE dbo.T1
(
 Code    CHAR(3) NOT NULL,
 Descr   CHAR(30),
 PercIVA NUMERIC (5, 2),
 PercIND NUMERIC (5, 2),
 IvaCEE  CHAR(3)
)
GO

INSERT dbo.T1 VALUES ('abc', 'Test1', 10.0, 10.0, NULL)
INSERT dbo.T1 VALUES ('def', 'Test2', 20.0, 0.0, NULL)
INSERT dbo.T1 VALUES ('ghi', 'Test3', 0.0, 0.0, NULL)
INSERT dbo.T1 VALUES ('lmn', 'Test4', 10.0, 10.0, NULL)
INSERT dbo.T1 VALUES ('opq', 'Test5', 10.0, 0.0, 'abc')
INSERT dbo.T1 VALUES ('rst', 'Test6', 10.0, 5.0, 'abc')
INSERT dbo.T1 VALUES ('uvz', 'Test7', 0.0, 0.0, 'abc')
INSERT dbo.T1 VALUES ('xyw', 'Test8', 0.0, 15.0, 'abc')
GO
1) Test1, Test2, Test3, Test4 are correct, because IvaCEE is NULL.
2) Test4 is correct, because IvaCEE is filled by Test1, that has
a) Its PercIva = Perciva of Test1 PercIva
b) Its PercIND is = ZERO
3) Test6, Test7 and Test8 are incorrect, because the condition a) and b) are not respected.

I need to validate the field IvaCEE, in order to respect the clause a) and b) when this field is filled.
I manage my form with a Cursor Adapter for my MSSQL Table, with a select and a cursor schema like these:
SELECT T1.code, T1.descr, T1.PercIVA, T1.PercIND, T1.IvaCEE from T1
CODE C(3), DESCR C(30), PERCIVA N(5,2), PERCIND N(5,2), IVACEE C(3)

I have had a suggestion to create a second cursor with a Where clause for the table in order to control the validity of PercIVA Field.
But I don't know if it is the better method, and how to create it exactly.

Sorry for my poor english, but I hope to have clarify the problem.

Thank You and Best Regards
Nino
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform