Under Reports > Query Tool you will notice that it no longer shows the tables of WebLink Connect; instead, it shows Views. These views are created by WebLink Connect to join commonly used tables together to allow users to more easily write and modify reports and SQL queries.
The functionality of the Query tool is basically the same as before when it comes to building a query. The most common view is the Profie_View which not only shows Profile data (such are reportname, workphone, ect.) but also Main Contact information (MC_ReportName, MC_WorkPhone), Primary Listing information (Listing_PrimaryListingCategory), Member information (Member_MemberSince), MemberActivity data, (MemberActivity_LastActivityDate), Profile Notes (ProfileNotes_Notes), and also Profile Address information (ProfileAddress_BillingAddress1). Before you would have to write a join statement to join the other table to the profile table to get back information such as what’s named above, but now you can use the query tool to find a view that have all the information needed without a join statement needing to be written. The Views work everywhere, Query Tool, SQL Writer Tool, and the Report Writer. (Please note, Views should not be added to Command reports or Table Reports unless you are removing the Command or Tables.)
To create a query in the Query tool, you would select the view you want in the drop down:
Then select the Field inside that View you want to see by highlighting the field name and pushing the >> button:
Make a selection in the “Selection” Tab by using the drop down to select the field you want to use, dropping down the expression to =, <, >, In, or Not In, input a Value in the Value text box, and then push “Set Value”. Here’s an example of Where Member = True:
You can set a Sort Order in the “Sort Order” tab by selecting the field you want to sort by, Selecting whether you want an Ascending or Descending sort, and pushing the Add button. Here’s an example of sorting by the Profile’s Zipcode in ascending order:
The SQL tab will show you the SQL query in code form that you are running against the database with your selected values in each tab. Simply push the “Get SQL” button and it will generate the SQL statement, and copy it to your clipboard so you can past the statement into an email, report, ECT:
Whenever you are done building your query in the Query Tool, and you want to run it against the database to get back your data, you simply need to push the “Run Query” button at the bottom left. You can use the “View SQL” link at the bottom right which gets the SQL of your query just like the SQL tab, or you can click cancel to exit out of the Query Tool:
Have more questions? Submit a request
Want some training on WebLink Connect? Sign up today for one of our upcoming online training classes.