Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complicated Query
Message
De
13/05/2008 11:09:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
13/05/2008 05:21:37
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 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01316576
Message ID:
01316656
Vues:
16
>Dear Sir,
>
>The code field is character type
>You wrote
>
>SUM(IIF((INT(t2.code/1000)) = 3201,t2.credit,0)) as amt1,;
>
>and to change character to number I modified as
>
>SUM(IIF(INT(VAL(t2.code/1000)) = '3201',t2.credit,0)) as amt1,;
>
>But it still shows error "Data type mismatch"
>
>Please help again

SUM(IIF(left(t2.code,4) = '3201',t2.credit,0))

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform