Thanks Lowell , but I am getting below error while executing the query.
"Ad Hoc queries are not allowed to be execute directly".
I don't know weather SQL Server provides any good way to do it.
i referred the below link as well.
http://blog.bansheetechnologies.co.uk/2009/02/ad-hoc-access-to-ole-db-provider-has.html