Hello. My name is Robert Pound, and I am a product technologist at Quest. In this video we'll discuss the object wizards in Toad Edge and walk through the creation of a view from the wizards.
In Toad Edge I've established a connection and I've opened up the database that I want to start working on. So in Object Explorer, as I navigate through the different objects, we can see the Wizard icon up here in the upper right-hand corner. And there's obviously a shortcut for it for each individual object. The shortcut is different.
But as I navigate through the list, you can see the icon changing. So you can create objects from the wizard or all except for the constraints and indexes, which have no wizard.
So let me go ahead and open up the wizard for the events. So you can name the event, obviously, Name123 here. And choose different parameters for the object depending on what the object is. In this case, event, obviously, you can select the time for execution.
And let me go ahead and pop up the Code Preview. This will show you what's being created as you walk through the wizard.
I'm going to create a view, because I can walk through all the steps. So let's name this DemoView123. Uh-oh, already exists. DemoView1234. And I'm going to leave all these parameters default. But obviously, I could change who defines this particular view, the security settings, algorithm, et cetera. I'm just going to leave that as is.
And let me go ahead and open up the Code Preview. So at this point we've just defined some of the parameters and the name of the view. But we're working through the rest of the content, so let me close it out.
So at this point I can select the objects that I want to add to this view. So let me go ahead and click Add. And this will open up a secondary wizard. So from here you can add any of the objects currently in the selected database. So I can add in tables as well as views.
You can also select from other schemas. So if there are objects or tables that you want to select data from in another schema, you can select that here. For instance, let me open up a demo. There's only one table in here. But let me go ahead and select it. So now you could start pulling in data from other schemas. I'm not going to do this for this demo, but just know that it's an option.
Let me go ahead and choose actor, address, and store. And click OK. So it's added these three tables in.
And we can see that it's immediately formed a join for us that we can manipulate in the next step. So let me go ahead and click Next.
So it's listing just one join. And if we look at the preview a little closer, we can see one of these is cross-joined. So I'm going to go ahead and remove the actor table, because I know that it's going to give me data that I don't want. You can always back up in the wizard. So at this point I'm going to simply remove the actor from this view and then go back.
And from here we can edit the joins. So if I wanted to, for instance, make this a left or a right outer join, I could do that here.
And we'll walk through, Next, look at the code. Now we're starting to build out a query for our view.
So at this point we can start selecting the individual columns. And I'm going to choose three or four of these at random, but you, obviously, can select and deselect all of them. And it's listed by table. So all the columns from address are first and then store.
At this point you can also do aggregations. So if I wanted to, for instance, aggregate on address ID-- I'm not sure I would-- you can aggregate, you can get the max average, et cetera, everything that you would expect, obviously, depending on the data type itself.
And when you do an aggregation, it does a GROUP BY automatically, so that the query can actually complete. And you can affect the order of the GROUP BY by simply moving the columns up. So if you wanted to see manage_staff_id be the top GROUP BY, you can move it up to the top of the list and then it will be at the top of the GROUP BY.
And let's go ahead and click Next.
And from here, you can select your conditions. So if we wanted to look at cities with a postal code, a specific one, we could enter that here, do a Single Condition, user-defined, et cetera. So let me go ahead and do 382 and preview it one more time. And we can see this is almost fully fleshed out query for the view.
And one more page. Any sort of Order By, we can select that here. So if we wanted to Order By store_id, for instance, we could choose that here. And then we would add in the ORDER BY clause.
And at this point, we have no other option. So we go ahead and click Finish. And the view has been created.
Hopefully, this video helped you understand a little bit more about the object wizard in Toad Edge. For more information on this product preview, visit www.toadworld.com/products/toadedge. For the upcoming full release of the product coming later this year, check out www.quest.com. Thank you and have a great day.