![]() ![]() Septem02:06PM Re: create views with variables. ![]() I am able to create a file out of the given select (an excerpt from the real thing). You are possibly looking for dynamic sql where you build code to be executed. I have the need to create a view from a somewhat complicate select. So please excuse my question if the solution is simpler then I can figure out. It's the first time I try to do more complex stuff than querying and subquerying. To create a simple SQL statement SELECT * FROM operationviewīut from there I don't know how to store the result in a variable and query the corresponding table to create a view like for op_id in (SELECT op_id FROM op_id):ĬREATE VIEW overview (SELECT op_id, sum(data) FROM operations_op_id)Īll I got from MySQL Documentation looks simple, but doesn't solve my problem. What I try to do is, create a view with the sum(data) of all single tables: | 20180101 | 3746| The content of each table looks | username | data | This is the table op_id which stores only operationID's | op_id |įor each op_id in op_id - table exists a own table. After 2 day of researching without a result I'm now asking for some hints. I am able to create a file out of the given select (an excerpt from the real thing): select ifnull(ev.ev, ah. It requires only the ability to connect to the server. This statement does not require any privilege. I want to create a view out of values from different tables. Posted by: Huu Da Tran Date: Septem02:06PM I have the need to create a view from a somewhat complicate select. SHOW GLOBAL SESSION VARIABLES LIKE pattern WHERE expr SHOW VARIABLES shows the values of MySQL system variables (see Section 5.1.8, Server System Variables ). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |