Print the result of the SQL query formatting correctly the data by rows and columns, generating the structure of a table (with or without the
headers of the columns).
1 print.sql
<print.sql head='head'>
<text /> ?
</print.sql>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Ahead | boolean | false | Indicator for the impression of the headers (name of the columns) in the output result. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Etext | String |
Example
Print by screen the result of a SELECT.
Copy
<xsql-script name='script_print_sql'> <body> <print.sql head='true'> <select> <columns> cabid, tipdoc, empcode, codigo, nompro, user_created, date_created, user_updated, date_updated </columns> <from table='gven_promoch' /> <where>empcode = '0'</where> </select> </print.sql> </body> </xsql-script> +-----+------+-------+------+-------------------------------+-------------+---------------------+-------------+---------------------+ |cabid|tipdoc|empcode|code |nampro |user_created |date_created |user_updated |date_updated | +-----+------+-------+------+-------------------------------+-------------+---------------------+-------------+---------------------+ | 2|PRO |0 |P1 |50% SECOND ITEM |abdel_jennino|2008-11-13 12:20:32.0|pcc |2008-12-16 17:53:52.0| | 3|PRO |0 |P2 |GIFT |abdel_jennino|2008-11-18 10:19:39.0|abdel_jennino|2008-11-18 10:19:39.0| | 4|PRO |0 |P3 |TWO GIFTS |abdel_jennino|2008-11-18 11:20:57.0|abdel_jennino|2008-11-18 11:20:57.0| | 5|PRO |0 |P4 |Promotion 3x1 and 5x2 |abdel_jennino|2008-11-18 11:42:40.0|abdel_jennino|2008-11-18 11:42:40.0| | 6|PRO |0 |P5 |GIFT ITEM OF LOWER PRICE |abdel_jennino|2008-11-18 21:21:23.0|abdel_jennino|2008-11-18 21:21:23.0| | 7|PRO |0 |P6 |GIFT IN MONEY |abdel_jennino|2008-11-19 09:21:46.0|abdel_jennino|2008-11-19 09:21:46.0| +-----+------+-------+------+-------------------------------+-------------+---------------------+-------------+---------------------+