You can achieve this in code and with some small test adjustments. I created a sample Test Studio project and you can find more details on the necessary steps below.
- Create a test and add empty local data table with the required columns and rows. You can rename the columns (see emptyLocalData.png).
- Record the necessary steps and data bind the ones you need. I did it for step 5 in the sample test.
- Add assembly reference to your project for System.Xml.dll.
- Add a coded step to set the results from SQL query to a collection. You need to declare the collection as static in the test's class, which will hold the results from the SQL query. In my example I used a List<string> to create a simple scenario.
- Add another coded step before you use the local data in your test. Here is when you need to overwrite the empty local data values with the ones from the static collection. Please check the sample code in step 4 for more details.
I hope this help you with the scenario at hand. If you need further assistance, please share more details about the test and code you currently have.