Dear Experts,

While debugging a procedure, I am not able to view the data of a local temporary table. Kindly suggest a way to view the same. I can't even see the name of the temporary table in the parameter list.

asked 21 Apr, 02:01

suberta's gravatar image

suberta
15115
accept rate: 0%


You can use the "Debug" menu item "Query Database" to execute queries against that temporary table when you hit a breakpoint inside that stored procedure.

The advantage with that feature is the query will execute in the connection context of the one executing the procedure so temporary objects will have the values present at that time and point of the breakpoint. Some limitations do exist but that is your main feature for this kind of thing.

The disadvantages of using the Query Database menu includes needing to pop in and out of that menu every time you need to do that (not a biggie if you only need to do this once), pasting/typing in the query every time and it is not something that can be 'docked' like locals or watches.

To get something to work as a watch, you can create [a] non-deterministic function(s) that queries the temporary table for single values/aggregates as required and then craft an expression from that adding that expression to your watches. {My quick test did not produce a usable expression just querying the temp-table directly; so the function approach may be a minimum requirement for this.}

I'm sure one can get even more creative here. For instance, your function can take a column_name parameter and then query an aggregation (maybe even a select-list) on that column using execute immediate, so that one function can do many different jobs.

permanent link

answered 21 Apr, 10:20

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
7.2k33106
accept rate: 32%

edited 21 Apr, 10:25

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×23

question asked: 21 Apr, 02:01

question was seen: 64 times

last updated: 21 Apr, 10:25