Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to : Copy Temporary File Excel

Status
Not open for further replies.

RemingtonSteel

Programmer
Jul 14, 2006
65
GB
Hello!
I have made this SQL Statement

Select *, substring(name,1,3) as examplename into #TempoCustomer from Customer

How can I copy(export) the #TempoCustomer into Excel?

I really appreciate your help on this.

Thanks!
Gene
 
Gene,

Select *, substring(name,1,3) as examplename into #TempoCustomer from Customer

This is not valid VFP syntax. Substring() is not a VFP function (probably you mean SUBSTR()). And to create a temporary table (i.e. a cursor), use INTO CURSOR rather than preceding the name with a #.

Having said that, the easiest way to export data to Excel is to use COPY TO .. TYPE XL5.

I really appreciate your help on this.

I'm sure you do. But it is a courtesy to acknowledge the replies you receive and to give some indication of whether they are useful. I hope you don't mind me mentioning this, but you had answers to at least three other questions in this forum in the last couple of days, but you have given no indication that you have even read the answers.

It will help everyone if you could say whether the answers you receive solved the problem, or, at the very least, if you could acknowledge the effort made by the people who take the trouble to answer you.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top