Answer» Hi all. How can I execute following SQL in bath file "SELECT Username from LoginTbl WHERE Username LIKE '%.abc'" The problem is LIKE '%.abc', batch file understand % like parammeter!
Please help me. Thank you. I wasn't aware you could run SQL from a batch file since SQL runs in the context of a database. Oh well, for SYNTAX this may be your answer:
Code: [Select] "SELECT Username from LoginTbl WHERE Username LIKE '^%.abc'"
I'm curious though, where is the connection to the physical file (database)? And where is the recordset DEFINED for the selected records?
You may want to check out: Reading Records From A Database for more ideas.
Hope this helps. I have solved this problem. We can you %%.abc or ^%.abc as you said. You can run SQL from batch file by using osql Utility Thank you for your REPLY.
|