Error saving SQL Query
-
Hello, I have noticed a problem in the Query Builder with saving a query, which I believe is a case of "unintended behaviour". I have created a query to create an SQL View, which is similar to this:- CREATE OR REPLACE VIEW combined_view AS SELECT table_r.common_name , TRIM(table_r.item_num) AS item_num , table_r.item , CONCAT('<a href="',table_a.file_url_1,'" target="_blank">File 1</a>') AS file_url_1 , CONCAT('<a href="',table_a.file_url_2,'" target="_blank">File 2</a>') AS file_url_2 , table_a.chg_note , TRIM(table_a.object_num) AS object_num , CONCAT('<a href="../item-list/?wpda_search_column_index=',table_r.index, '" target="_blank">Item details</a>') as item_details FROM table_a LEFT JOIN table_r ON table_a.index = table_r.index; The query runs successfully, and creates the SQL View, with the flie_url fields formatted and functioning correctly. However, when I save the query for future use (e.g. when the view needs to be regenerated), in the saved version, the CONCAT lines are incomplete, and appear like this:- , CONCAT('File 1') AS file_url_1 , CONCAT('File 2') AS file_url_2 The resulting entries in those columns are, of course, ineffective as links! This is rather frustrating, as the query to create an SQL View is a type that is particularly likely to be required for future use, e.g. if the system is copied to another machine. I had added some edits to the query (to add the TRIM commands for some fields), and these have been saved correctly. I have also repeated the save of the query with a different name, but the error is the same. I presume that is not the intended behaviour? Thanks in advance for your help. Nigel
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Error saving SQL Query’ is closed to new replies.