Web Based Queries (1 Viewer)

jdunca4

Registered User.
Local time
Today, 15:01
Joined
Oct 29, 2013
Messages
16
To whom can help me. I am converting my database to a web database for sharepoint use. Besides the fact that you can't do all kinds of things with web queries my particular issue is my query is returning more results than it should. There is no distinct value option, you can't create and use functions, you can't reference forms, and you can't make more than one relationship connection between the same two tables, etc. My query is set up with with 12 fields. All fields but 2 have the criteria:

Like [Question?] & "*" or Like IsNull([Question?])

The other two have no critera. This criteria above should prompt the user for parameters, which it does, and if nothing is entered return all results which it does. My problem is that some but not all of the inforamtion from the tables is being duplicated by a factor of the number of entries associated with the data.

Example: My Fields are

WRNumber, Network, Crew, Line Supervisor, Job Type, NoOfPoints, Letter, Company, State, QuestionText, and Answer 2.

So for a given WRNumber there are "X" NoOfPoints and each point has 39 QuestionText(questions) and each question has a yes or no Answer2 (given by the values blank or 2). The Letter field could be populated with A, B, C, etc. So for example you may have NoOfPoints equal to 7 twice but one of them have a Letter of A. (so point 7 and point 7A). From what I can tell in one of the scenarios is that a single WRNumber is being duplicated 12 times which happens to equal the number of points (NoOfPoints) associated with this WRNumber. (i.e. there is 1 WRNumber with 12 NoOfPoints and 39 Questiontext so the total results for this query are 12 NoOfPoints times the same 12 NoOfPoints times 39 QuestionText = 5616 results when the query should actually return 468 results)

I know this is hard to understand via written explanation but if someone could begin asking questions I can answer such that you understand and can possibly help. Thanks.
 

WaiveIt

Registered User.
Local time
Today, 13:01
Joined
Dec 2, 2013
Messages
58
Can you post the SQL from before and after you changed to Sharepoint lists?

Actually you might not even need to do that. Just find the old SQL and compare it to the new SQL. You might be able to figure out by looking at them side by side.

I can't tell what is going on yet, but at first glance it seems one of your joins needs a direction. If you used the visual Access query builder to mimic your old query with Sharepoint lists, instead of Access tables, they won't be joined properly if your previous tables were related by more than one field.

I believe creating correct JOINs in your SQL will overcome the inability for Sharepoint lists to be related as complexly as Access tables.
 

jdunca4

Registered User.
Local time
Today, 15:01
Joined
Oct 29, 2013
Messages
16
I can't access the SQL in web based queries. Attached is the database. I'm not using SharePoint lists but rather converted the existing tables to web based tables and have referenced them the same way minus the fact that you can't have more than one join between two of the same tables as you can if not web based.
 

Attachments

  • Report Generator Web Based.zip
    1.2 MB · Views: 61

Users who are viewing this thread

Top Bottom