Search code examples
sql-servert-sqlvisual-foxpro

Translating Foxpro into TSQL


I couldn't think of a better title, so if you have one, feel free to edit my post.

I have this:

SELECT payor.payor_cd, payor.desc, .f. AS selected ;
    FROM dbfs\payor ;
    WHERE broker ;
    INTO CURSOR 'TempPay_RO' ;
    ORDER BY payor_cd

This is what I have when I tried to translate this into T-SQL:

select
     payor_cd
     desc
from
    payor
order by
    payor_cd;

Here are my questions:

1) What is .f ? There is nothing prior to this foxpro query that describes what it is.

2) What is meant by the where broker part? Where broker is what? Broker is just a column in the table.


Solution

  • In SQL Server context

    select payor_cd
          ,[desc]
          ,Selected = convert(bit,0)
    from  payor
    Where Broker = 1
    order by payor_cd