All: I cannot remember which veteran R:BASE developer posted the core of
the attached code, below, but THANK YOU, whomever.
This has proven so handy for me, may the herein repackaged core prove
handy for you.
courier new font
**********Begin:
{UTILITY | Interactive: Find all Tables containing a given column Name}
--file: utility_find_all_tables_containing_columnName.rmd
--rbse: GENERIC
--auth: forgotten R:BASE author *thank you!*
--edit: packaged by bachitiea
--crea: 2020-08-12
--updt: 2021-05-15 file header
--updt: 2021-07-11 file header | browse options
--updt: 2021-07-20 formatting vetting sharing
{purpose : Display all tables/views containing a given columnName.
Useful for planning changes to a column's design parameters, before
engaging the Data Designer, which may otherwise prevent changes.}
{variable names begin with, and are CLEARed with string 'vgetTables_'
to prevent interference with existing 'v' variables in the active
R:BASE session}
--show prep -----------------------------------------------------------
CLS
DEBUG SET TRACE ON
--variables -----------------------------------------------------------
SET VAR +
vendKey TEXT = NULL, +
vgetTables_dialogCaption TEXT = NULL, +
vgetTables_dialogMessage TEXT = NULL, +
vgetTables_dialogResponse TEXT = NULL, +
vgetTables_searchColumnName TEXT = NULL, +
vgetTables_browseWindowCaption TEXT = NULL
--select the search column --------------------------------------------
SET VAR +
vgetTables_dialogCaption = ' Find Table Names', +
vgetTables_dialogMessage = 'Search for ColumnName :'
DIALOG .vgetTables_dialogMessage +
vgetTables_dialogResponse = 30 +
vendKey 1 +
CAPTION .vgetTables_dialogCaption +
OPTION THEMENAME longhorn +
|MESSAGE_FONT_NAME calibri +
|MESSAGE_FONT_SIZE 11 +
|BUTTON_OK_FONT_NAME calibri +
|BUTTON_OK_FONT_SIZE 11 +
|BUTTON_OK_CAPTION OK
IF vendKey = '[Esc]' THEN ; GOTO cleanup ; ENDIF
--showtime ------------------------------------------------------------
SET VAR +
vgetTables_browseWindowCaption = +
('Host Tables for Column : ' + (LUC(.vgetTables_dialogResponse)) )
BROWSE sys_table_name, sys_table_id +
FROM sys_tables +
WHERE sys_table_id +
IN (SELECT sys_table_id +
FROM sys_columns +
WHERE sys_column_name = .vgetTables_dialogResponse ) +
ORDER BY sys_table_name +
OPTION |CAPTION &vgetTables_browseWindowCaption +
|WINDOW_STATE NORMAL +
|TOP 50 |LEFT 500 |HEIGHT 400 |WIDTH 550 +
|COLUMN_WIDTH[0] 400 |COLUMN_WIDTH[1] 80 +
|ZEBRA_STRIPE ON
--cleanup -------------------------------------------------------------
LABEL cleanup
CLEAR VAR vgetTables%, vendKey
CLS
--routineExit ---------------------------------------------------------
LABEL routineExit
DEBUG SET TRACE OFF
RETURN
Bruce A. Chitiea | SafeSectors, Inc.
112 Harvard Ave #272 | Claremont CA 91711-4716 | USA
[email protected] | +011 (909) 238-9012 c | +011 (909) 912-8678 f
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/emb7616b1b-a8ef-4373-b03e-2eacc4d3e882%40pathfinder.