I have .sql file with a very long query, around 1000 lines. Does there exist a way to execute this entire query in a database in katalon? We can do so for a query that is a single line, and which is stored as a string. For example, we store such a query as follows:
Connection conn1 = DriverManager.getConnection("DB connection info here"); String sqlStrSelect3 = "Query line goes here'"; st3.executeQuery(sqlStrSelect3)
But how do we do it if its 1000 lines long? All we can think of is to convert this query into 1000 seperate strings in a row, which would work, but is highly painful. For example, can we just run a .sql file itself from Katalon or copy and paste the 1000 lines into a Keyword or a Package or Data File?
I tried creating a “Database Data” Data File, but when I tried to “Fetch the Data” I received the error “Unable to fetch data from database.” This error message makes sense because the query is not intended to access data from the database table, but actually inserts data into it. So I’m not sure what to do in this case.