Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
lotek
Starting Member
42 Posts |
Posted - 2005-10-01 : 01:45:20
|
| Basically i need to program an application that gives end users the ability to perform adhoc queries, meaning to select fields and set conditions from approx 10 different tables. This needs to be done without involving sql syntax. One hurrdle is coming up with a solution to address the joins between all the different tables. I am not sure how to approach this because of all the potential possibilities. One thought was to create a table of relationships and basically scan through the fields they are querying and dynamically create an appropriate join statement. I have done this in the past and it works ok, but im fishing for a better solution.Thoughts? |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-10-01 : 11:23:26
|
| Is the database already created? Have you looked at Report Builder in SQL Server 2005?MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
lotek
Starting Member
42 Posts |
Posted - 2005-10-01 : 16:22:40
|
| Teh database is already built and and the report builder is not exactly what i am looking for. I basically need to just generate a dynamic where clause for insert statements. Just trying to find a solution to deal with all the joins.Thanks |
 |
|
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-10-01 : 17:11:36
|
| Create one big view with all the columns and all the tables.(just one big join).The user picks any fields they want from this view, and you let sql server worry about the rest. |
 |
|
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2005-10-01 : 19:35:46
|
quote: The user picks any fields they want from this view, and you let sql server worry about the rest.
AmenDavidMA front-end is something that tries to violate a back-end. |
 |
|
|
|
|
|