• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3283
  • Last Modified:

SQL Case Statment against a Visual Foxpro Database

I wish to execute a SQL statement like below against a Foxpro Databse.

SELECT  P_CRITICAL , (CASE WHEN P_CRITICAL = 'Quality' Then '+'  Else  '-'  END) as P_CRITICAL FROM Foxpro.dbf

I'm unsure what version the Foxpro databases are at.

any help would be very much appreciated as I've tried many different combinations and I read that foxpro SQL is "different" to access SQL.  I also tried the IIF got closer but no luck.

thanks in advance
Sean
0
SAJC
Asked:
SAJC
  • 3
  • 2
1 Solution
 
SAJCAuthor Commented:
Thanks Computron

I reread my question and although it was clear in my head what I wanted, I see now I missed a vital sentence.
I'm using VB6.0 to access Foxpro.  I can retrieve * from foxpro.dbf no problem I want to use
a Select case statement against foxpro databases using VB and maybe my SQL statment above.

Apologies for not posting my question clearly.
thanks
Sean
0
 
SAJCAuthor Commented:
SELECT  P_CRITICAL , (CASE WHEN P_CRITICAL = 'Quality' Then '+'  Else  '-'  END) as P_CRITICAL FROM Foxpro.dbf


I'm using VB6.0 to access Foxpro.  I can retrieve * from foxpro.dbf no problem I want to use
a Select case statement against foxpro databases using VB and maybe my SQL statment above.

Or is there any other way to do what I want.
If the field has  value of Quality then return change it  to '+' Otherwise change it to '-' and return the field to VB.
so the VB field should + or -


I need this urgently so I can offer more points Is 500 the most you can give ?

0
 
SAJCAuthor Commented:
Found the problem answered in Foxpro Forum
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now