Does anyone know how to convert FoxPro commands to SQL commands?
Yes someone does. Which command are you wanting to convert?
Well there are a few queries with fox pro commands that I needed translation to SQL. Here is one for example below and if it is ok with you, I can send you a couple more.
SORT TO temp ON username, rwb
USE temp
GOTO top
IF LEN(ALLTRIM(rwb)) = 1
replace rwb WITH '0'+rwb
ENDIF
holdrwb = rwb
holduser = username
counter = 0
SKIP 1
DO WHILE .not. EOF()
IF rwb = '99'
IF holduser = username
DELETE
ENDIF
ELSE
IF LEN(ALLTRIM(rwb)) = 1
replace rwb WITH '0'+rwb
ENDIF
ENDIF
holdrwb = rwb
holduser = username
SKIP 1
ENDDO
@Trininole,
Can you explain what these commands do?
There is no direct correlation between FoxPro and SQL. The closest you could hope for is translation of the FoxPro code to a stored procedure. I am familiar with Clipper which is another X-Base language like FoxPro and could probably translate your code into a stored procedure but it would be a rough translation at best because my skills with stored procedures is limited. Perhaps if you could provide more information about what you're trying to accomplish I could be more helpful
This look promising
http://www.dbase.com/Knowledgebase/INT/xbase_to_sql/x2sql.htm
I looks like the code is missing something before it. Wouldn't you have to USE the source table first in X-BASE?
SELECT username, CASE WHEN rwb<10 the '0' + rwb ELSE rwb END holdrwb
FROM MyTable;