Photo Credits: images.businessweek.com |
A simple SELECT statement like the example below creates a new table in VFP from a query:
SELECT field1, field2 FROM SomeTable Into Table NewTable
In MS SQL Server, the syntax is similar with changes so minor that they're almost alike except that the "Table" clause is dropped and the "into" is added before the "from" statement.
SELECT field1, field2 INTO SomeData.DBO.NewTable FROM SomeTable
Such command is useful in SQL Server if you want to make a temporary repository of your multiple queries for joining them into one final set of records which is better than having to sacrifice speed in favor of views.
No comments:
Post a Comment