I hope this can help you . I am kind of using the same thing, but I use it as a data dictionary lookup of my database. But the point is this, you can start typing the the table name and it narrows the list down. This from resides at the top of the page. I do output all the tables to the page and essentially the the table name that type is simply a link to the table name where ever it is in the page. For a DBA , such as myself, I use this tool often. Better than thumbing through a paper Data Dictionary to understand what is in the 740 tables

<cfquery name="gettabs" datasource="dictionary">
SELECT DISTINCT tablename FROM dictionary
ORDER BY tableName
</cfquery>


<cfquery name="getdic" datasource="dictionary">
SELECT * FROM dictionary
WHERE fielddatatype <>'description'
ORDER BY tableName,fieldname
</cfquery>


<link href="" rel="stylesheet" type="text/css">


<SCRIPT LANGUAGE="_javascript_">


function goTo() {
    var selIdx = document.SearchForm.cbSearchSelect.selectedIndex;
    location.hash =
document.SearchForm.cbSearchSelect.options[selIdx].value;
}


</script>

<SCRIPT language="_javascript_">
<!--


function searchSelectBox(in_sFormName, in_sInputName, in_sSelectName)
{
sSearchString = document.forms[in_sFormName].elements[in_sInputName].value.toUpperCase();
iSearchTextLength = sSearchString.length;

for (j=0; j < document.forms[in_sFormName].elements[in_sSelectName].options.length; j++)
{
  sOptionText = document.forms[in_sFormName].elements[in_sSelectName].options[j].text;
  sOptionComp = sOptionText.substr(0, iSearchTextLength).toUpperCase();


  if(sSearchString == sOptionComp)
  {
   document.forms[in_sFormName].elements[in_sSelectName].selectedIndex = j;
   break;
  }
}
}
file://-->
</SCRIPT>
</HEAD>

<body>


<FORM NAME="SearchForm" >
<INPUT type="text" name="edSeachInput" searchSelectBox('SearchForm', 'edSeachInput', 'cbSearchSelect')"><BR>
<select NAME="cbSearchSelect" > <cfoutput query="gettabs">
<option value="###tablename#">#UCase(tablename)#</option>
</cfoutput>
</select> <input type="button" value="go" > </FORM>


<p>


<cfoutput query="getdic" group="tablename">
<table width="760" valign="top">
  <tr valign="top">
   <td valign="top" colspan=4><b><a name="#tablename#">#UCase(tablename)#</a></b></td>
  </tr>
  <tr bgcolor="cccccc">
   <td valign="top" width="30%"><font size=2>Column</font></td>
   <td valign="top" width="15%"><font size=2>Data Type</font></td>
   <td valign="top" width="5%"><font size=2>Size</font></td>
   <td valign="top" width="50%"><font size=2>Description</font></td>
  </tr>
<cfoutput>
  <tr>
   <td valign="top"><font size=2>#fieldname#</font></td>
   <td valign="top"><font size=2>#fielddatatype#</font></td>
   <td valign="top"><font size=2>#fieldlength#</font></td>
   <td valign="top"><font size=2>#fielddesc#</font></td>
  </tr>
</cfoutput>
<tr><td colspan=4><a href="" ><font color="red" size="1">back to top</font></a><br>&nbsp;</td></tr>
</table>
</cfoutput>


</body>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to