I posted this in the vbscript forum as I was using vbscript to do most of the processing but it is truly an SQL query issue I am havning. I want to transer 10 random records from an Excel file and place them in another Excel file without using Excel Automation. This would be my query to reture 10 random records:
I am unsure of the syntax and I am not too fluent is SQL.
Swi
Code:
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & FolderPath & objFile.Name & ";" & _
"Extended Properties=""Excel 8.0;"""
"SELECT TOP 10 * FROM [Sheet1$] ORDER BY RND([COUNT])"
I am unsure of the syntax and I am not too fluent is SQL.
Code:
SELECT * INTO [Excel 8.0;Database=C:\Test2.xls].[Sheet1] WHERE (SELECT TOP 10 * FROM [Sheet1$] ORDER BY RND([COUNT]))
Swi