Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sqlserver CASE WHEN.. THEN ... END doesn't work with vfp
Message
From
17/01/2011 03:59:54
 
 
To
16/01/2011 09:59:41
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01496269
Message ID:
01496345
Views:
65
here is the sqlserver script that create the table DETMVT

CREATE TABLE [dbo].[DETMVT](
[NUMDET] [int] NULL,
[NUMMVT] [int] NULL,
[MVTDET] [int] NULL,
[NUMCPT] [int] NULL,
[RUBCPT] [int] NULL,
[MONTANT] [money] NULL,
[SENS] [int] NULL,
[GROUPE] [int] NULL,
[SOLDE] [money] NULL,
[SUPRIME] [bit] NULL
) ON [PRIMARY]

here is the VFP LOCAL VIEW i want convert into REMOTE VIEW

SELECT SUM(IIF(Detmvt.sens=1,Detmvt.montant,Detmvt.montant*0)) AS debit,;
SUM(IIF(Detmvt.sens=2,Detmvt.montant,Detmvt.montant*0)) AS credit;
FROM detmvt

REMOTE VIEW

SELECT SUM(CASE WHEN Detmvt.sens=1 THEN Detmvt.montant ELSE Detmvt.montant*0 END) AS debit,;
SUM(CASE WHEN Detmvt.sens=2 THEN Detmvt.montant ELSE Detmvt.montant*0 END ) AS credit;
FROM detmvt

error message sent by vfp after this code : FUNCTION NAME IS MISSING ).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform