Sometimes it can be useful to be able to add a virtual record to a recordset derived from a text file without actually adding a physical record into the file.
With the text file ODBC driver the table name can be omitted such that
SELECT 'Hello world!' as [Greeting]
results in
Greeting
Hello world!
Consider a names.txt file with first_name and surname columns. You could add John Doe onto the query output by doing something like
SELECT * FROM [names.txt]
UNION ALL
SELECT 'John' as [first_name]
, 'Doe' as [surname]
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment