Create a query

Results 1 to 5 of 5

Thread: Create a query

  1. #1
    mark Guest

    Default Create a query

    In Access, you can build a query using the design view, right? Well, has anyone given thought to creating an online tool that has similair functionality? Or has this already been done? I think this kind of tool would be extremely useful, especially if you want users to be able to query your database with little or no knowledge of how to write SQL code.

  2. #2
    Join Date
    Dec 1969

    Default We have an intranet one

    Yes, I built a small intranet one for our secretaries to use, it&#039;s not exactly like the one in access, but has some selection boxes that include the following...<BR><BR>SELECT, INSERT, UPDATE, DELETE<BR><BR>and then they choose the fields they want to add in the query, then they can chose a "filtering" which inserts a WHERE statement and then they push a button called "LET&#039;S SEE THE QUERY" and it gets auto generated, it doesn&#039;t need the interaction with a database. i can&#039;t give you the code because it&#039;s an intranet site on our servers. sorry... hope this helps you some.

  3. #3
    mark Guest

    Default Any other ideas out there?

    Thanks for the post, but it doesn&#039;t really help me. I understand how it needs to work, I&#039;m just lazy and I&#039;d rather adapt someone else&#039;s code than do it all from scratch myself :)<BR><BR>I&#039;ve started building it already <BR>Right now, I can:<BR>- query up to three tables joined in any way<BR>- choose whether to show the field or not<BR>- choose an operator from a list<BR>- detect the type of field (Number, Text, Memo, Yes/No) and display the appropriate type of html input tag<BR>- sort the columns ascending<BR>- save the query for later<BR><BR>However, there are several enhancements that I&#039;d like to do but just don&#039;t have the time.<BR><BR>Enhancements:<BR>- unlimited number of tables to query from (also, unlimited number of table joins)<BR>- sort (and specify what to sort first, second, etc. and which way - ascending or descending)<BR>- specify the order in which to show the fields<BR>- specify the field headers for the resulting report<BR>- specify a format to display the information (i.e. currency - $#.##)<BR>- script to create a printable version<BR>- script to export the report to an excel file and download

  4. #4
    Join Date
    Dec 1969

    Default You are on right track..

    If anything, you are going too far.<BR><BR>Look, every DB has just such a tool, so you don&#039;t need one in an inTRAnet situation, right? And why would you *want* to expose a database to more than what you are in an inTERnet situation?<BR><BR>I think 3 tables joined as a max is, if anything, overkill. Try explaining to Joe Sixpack user how to do even a two table join! And suppose you gave N-table join you really want some malformed query tying up your DB system for minutes while it searches every field in 35 tables for the word "a" using LIKE &#039;%a%&#039; ???<BR><BR>I think reasonable limits in this kind of "toy" are just fine.<BR><BR>Personal opinion, strictly.<BR><BR>

  5. #5
    mark Guest

    Default RE: You are on right track..

    I agree with you Bill. What I was thinking of doing is setting up some sort of report type where I determine what the tables, fields, and joins are. So it&#039;s ME who needs to have the N-table join capability (well, maybe just 5 or 6-table join capability).<BR><BR>Once a user selects the type of report, I just display all the fields that I&#039;ve pre-selected. And from there, they have the ability to select field order, whether to show, how to sort, how it should be displayed, and what operator.<BR><BR>I&#039;m trying to minimize the number of custom reports I need to set up. Now, of course I&#039;ll have to train the users, but hopefully I won&#039;t be getting a call every couple of days asking me to set up a new report. These users just love to bombard me with "Wouldn&#039;t it be nice if...."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts