Toad World® Forums

Still loving named queries in Schema Browser - small bug

Good Afternoon John,

         I should have told you about this earlier; I even use a work around.  

    I have a named Query as follows (commented out where):  

SELECT CONT_EMAIL, common…(…) “Grantee_Password”,

/* test_passwords.sql */

DATE_PW_CHANGED, TIMES_REMINDED, PROG_CODE, INST_TYPE, START_PREF, ZIP, rcip_no, w2w_password,

–ROWID, RCIP_NO, SEQ_NO, W2W_PASSWORD,

–W2W_PIN, CONT_NAME, ADDR1,

–ADDR2, CITY, STATE,

–ZIP, CONT_PHONE, CONT_FAX,

–CONT_EMAIL,

DATE_DELAYED,

DATE_PW_CHANGED,

DATE_LAST, DATE_NOTIFIED, DATA_ADDED_BY,

NOTIFICATION_SENT_BY, PRIM_CONTACT, RCIP_NAME,

CONT_TITLE, RCIP_TYPE, --START_PREF, DATE_DELAYED, TIMES_REMINDED,

DATE_PW_CHANGED

FROM COMMON.WHO_ARE_YOU

natural join COMMON.WHO_ARE_YOU_CHANGES

–Where

–lower(CONT_EMAIL) = ‘wickliffe.larry@dol.gov’ and

–NOTIFICATION_SENT_BY IS NOT NULL

– AND DATA_ADDED_BY IS NOT NULL

–AND

–W2W_PASSWORD IS NOT NULL

–AND date_last > to_date(‘12/01/2015’, ‘MM/DD/YYYY’)

ORDER BY DATE_LAST DESC NULLS LAST

If I apply a named filter, the filter replaces the entire query (the filter takes on the Query name, too):

WHERE

cont_email = ‘l.wickliffe@hush.com’

Since there is no select …

from …

this fails.

Larry

703-508-4945

PS. My work around is to create extra named query with the different filters.

PSS. Thank you! Still love it!

Sorry, I was mistaken, names stay correct: (the filter takes on the Query name, too)

Larry

Hi Larry. Thanks for the example. Actually, the problem isn’t the commented out where clause, it’s the natural join. I tried it with a regular join, but that didn’t work either because when you add the filter, it wants to swap out your where clauses.

When you add the filter, this is what I do:

  1. Find and remember the query text up to the first table in the FROM.

  2. Grab the partition and alias if specified with the table name.

  3. Grab the “Group by”.

Rebuild the query with 1) + 2) + where and order by from the filter.+ 3).

Step 1) is getting confused by the natural join though. Maybe I need to rethink my technique. I’m glad you have a workaround in the meantime though (another would be to make a view out of the joined tables and do the filtering on the view instead). I’ll look at it soon.

OK, it’s fixed for next beta.

Good Afternoon John,

 Thank you!  The fix works great!  

 I can still crash the code by putting fields in some filters that are not in all queries; but that is my own fault.  TOAD creates the correct invalid select that I asked for.  :-|  

Larry

P.S. Great! Two enhancements in this beta. (1) named queries. (2) export from multi-selected tables/views in Favorites. I guess I’m not getting a third, which has been in Idea Mill for a year. just like your browser. :slight_smile:

I looked for your F11 request in the idea pond but didn’t see it. I guess you want something to go full screen?

Good Morning John,

 My thought is just like all browsers; every tool bar and the window trimmings are gone; full screen devoted to whatever you are doing (writing code, viewing results, drawing a diagram, whatever - but no toolbars or window trimmings consuming screen space; they are only an <F11> press away).    

 BTW - I see some Eclipse developers asking for double click in editor window doing the same thing, just like Eclipse; since I'm not an Eclipse user and I double click all the time to select a word in the editor, I'd like the option to limit the function to <F11>, but other than adding another configuration item, I could deal with this, too.

   The search capability of Idea Pond is minimal.  From my ad at work (the links will take you to the Idea Pond item):  I hear I just need a Product Manager to sponsor my item, but I have only gone so far as finding a TOAD Product Manager, not persuading them to my idea, yet.  

Good Afternoon TOAD users,

           I’d like to request your vote to add <F11> toggle to full screen mode added to TOAD (like your browser):  I’ve cast my vote on [Idea Pond](http://www.toadworld.com/products/toad-for-oracle/i/other/82ceecc6-db43-4311-bc61-f4953220817d), please:
  1. Click the Idea Pond link,
  2. Log in to TOAD World and
    Press the up arrow, , over the vote count (under the word View).

Larry