This SQLCODE() Opens in a new tab method can also be called as a stored procedure: %SYSTEM_SQL.Functions_SQLCODE(-nnn). To determine the meaning of an SQLCODE numeric code, use the following ObjectScript statement: It is generated when a more specific SQLCODE error code is not available. The SQLCODE -400 error “Fatal error occurred” is a general error. In Embedded SQL, when SQLCODE=100 the output host variables specified in the INTO clause are nulled. For an UPDATE or DELETE these include: the specified table contains no data or the table contains no row of data that satisfies the WHERE clause criteria. For a SELECT these include: the specified table contains no data the table contains no data that satisfies the query criteria or row retrieval has reached the final row of the table. SQLCODE=100 indicates that the SQL operation was successful, but found no data to act upon. However, if the SELECT performs an aggregate operation, (for example: SELECT SUM(myfield)) the aggregate operation is successful and an SQLCODE=0 is issued even when there is no data in myfield in this case SUM returns NULL and %ROWCOUNT=1. For a SELECT statement, this usually means the successful retrieval of data from a table. Use rticompany select * from =0 indicates successful completion of an SQL operation. The other two domains are not in the script, at all. Nothing changes when I execute it a second and third time it remains enabled.įrom what I can see, RTICommon is accounted for in the fully qualified Select statement. When I return to 'use RTICommon' and execute it, the export button changes to enabled. When I execute 'use rticompany', the button remains disabled. Nothing changes when I execute it a second and third time the button remains disabled. When I execute 'use rticommunication', the button is disabled. Nothing changes when I execute it a second and third time the button remains disabled. Nothing changes when I execute it a second and third time it remains enabled. When I execute the 'use RTICommon', the export button remains enabled. The Select is fully qualified with domain and schema. I execute the Select, not the use statements. In the end, I am not sure why they introduced this default schema selection into the tool, it seems like a 'nice to have', but is unnecessary when querying against multiple schemas as you would from a Redshift instance.įirst things first. You can see that you have the option to select which default schema or schemas you want to use when running your SQL, however the list seems to be cut short and does not display all of my schemas in my redshift instance so I am not able to work around this new feature by selecting the schemas used in the query. Looking at the updated help page - section Writing and executing SQL statements / Controlling the schema search path for PostgreSQL and Redshift found here. So the workaround for that is creating a new console window everytime I want to run a report and only being able to export once before, I have to move to another window if I made any changes to my query. Then I noticed something - When it runs the query the first time, the tool picks a default schema (upper right-hand corner of the console window) and once it has picked the default schema it stays that way when I re-open the file or DG. I am querying against a Redshift data source and when I first open and run a SQL query it lets me export the results but stops working upon re-opening or restarting DG. I already submitted a ticket, but I think I was able to figure out my issue.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |