Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Michael Covington
  Where is Michael Covington?
 Pinehurst
 North Carolina - United States
 Michael Covington
 Tags
Subject: Case statement
Thread ID: 49666 Message ID: 49666 # Views: 22 # Ratings: 0
Version: Unknown Category: Visual Basic
Date: Monday, August 23, 2004 4:52:10 PM         
   


I have an SQL query that I have been running from a VB app to a SQL server database. I would like to run this same query on the same data set in FoxPro free table. Can anyone tell me how to convert this query so that I can execute it from VB? The only thing I have changed here is the removal of the single quote characters.

SELECT case when svcarrtype in (" & 24 & "," & 22 & ") then replace(replace(svcarrfmt," & " " & "," & "" & ")," & "-" & "," & "" & ") when svcarrtype = " & 20 & " then RIGHT(LEFT(svcarrfmt, 16), 10) when svcarrtype in (" & 17 & ") then rtrim(ltrim(aggrfmt)) else svcarrfmt end as svcarrfmt From saxref WHERE svcarrtype NOT IN (" & 11 & "," & 13 & "," & 16 & "," & 15 & ")



COMPLETE THREAD
Case statement Posted by Michael Covington @ 8/23/2004 4:52:10 PM
RE: Case statement Posted by Yuri Rubinov @ 8/23/2004 6:36:03 PM