Shortcut to SQL Query (View)?

rokuk

Registered User.
Local time
Today, 12:41
Joined
Dec 11, 2007
Messages
24
Is there a keyboard shortcut to open a new query in SQL view?

I find myself encouraging carpal tunnel by:
> going to "queries"
> "new query"
> "design view"
> closing the "show table" dialog box
> right clicking the new query
> finally selecting "SQL view".


There has GOT to be an easier way that this 6-step process to ~run a query~ in a _database_ ... but I haven't run across it yet though. Any help here? My wrist thanks you ; )
 
I'm glad you asked that. Now you've got me trying to solve it for my own needs.

I'm pretty sure it all starts at Tools|Customize|Commands. On the left side, there is an entry called "Query Design" which has a detail item called "SQL View". You should be able to drag this somewhere and get access to the SQL View of query desiner. Alas, for me it doesn't work when dragged to my "Edit" menu.

Let me know if you find a solution.

Anyone else have ideas/solution?
 
perhaps there isnt - its hard to imagine why someone would prefer to use SQL in general, rather than the design panel
 
that's sarcastic, right? ; )

I've found the design panel to be cumbersome and confusing. I'd much rather just write the queries.

Am I maybe missing something here? :cool:
 
I'm guessing you are using 2003 or older? In 2007 it's 2 steps, click on the "Query Design" and then select "SQL" from the view menu. I guess 3 steps if you count exiting the show table box that pops up.
 
Yes, I am using the 2003 - unfortunately.

Wow, I can't believe there is no keyboard shortcut. That seems... slightly ridiculous. Oh well, shared misery is better than lone misery =p

Thanks anyways all... :)
 
rok, i wasnt being sarcastic

i cant imagine why anyone would elect to write sql directly, when the drag and drop interface is so friendly

occasionally you have to get dirty, but i much prefer not having to think about tricky syntax unless i realy have to.
 
.

Huh. Imagine that. Well maybe I will have to go back and give it a second try sometime.


In related news, I think I may have found a way. It's not a key shortcut, but it looks like you can add a custom button to the top 'database' group of icons for Queries. I hadn't played around with this before, so maybe someone more familiar could be of help.


I right-click the toolbar icons, hit Customize, and on the Commands tab I choose "Query Design" and hit the button to Rearrange Commands. On the new screen, I hit "Add" and on the next screen I choose "Query Design" as the Category. There, you can scroll down the list on the right and they list things such as "SQL View" and "Select Query."

If I add those buttons, I see them on the toolbar, but they are never -not- greyed out. So I see them, but can't use them. I've tried doing it with focus on the Queries list, with a query open, with nothing selected... but never is the button "usable." My hope is that I could maybe press it and it would either pop open a blank query window in SQL View, or a new SELECT query window... I'm not sure if that's what those buttons being added to the toolbar would actually -do- but not being able to use them at all is probably not right either ; )


Anyone have any insight into this? Thanks !!

:)
 
rok, i wasnt being sarcastic

i cant imagine why anyone would elect to write sql directly, when the drag and drop interface is so friendly

occasionally you have to get dirty, but i much prefer not having to think about tricky syntax unless i realy have to.

Because they are proficient at writing SQL queries?

To correlate it to Operating Systems it is the old argument "why use a command line when you have the GUI?" The answer is of course you usually can do more with a command line prompt.

As you suggested you don't always get what you want from design view. People who have experience with other databases find it easier to write straight SQL. I use the design view also but only when it is a quick and dirty query. I usually refine it in SQL view later on.

Just my 2 cents.
 
Because they are proficient at writing SQL queries?

To correlate it to Operating Systems it is the old argument "why use a command line when you have the GUI?" The answer is of course you usually can do more with a command line prompt.

As you suggested you don't always get what you want from design view. People who have experience with other databases find it easier to write straight SQL. I use the design view also but only when it is a quick and dirty query. I usually refine it in SQL view later on.

Just my 2 cents.

QFT ... QFT ... QFT (Quoted For Truth)

I am exactly the same...
 
QFT ... QFT ... QFT (Quoted For Truth)

I am exactly the same...

You are entitled to your opinion, fortunately for the development and spread of computing you are in a minority.
Only a masochist /techno egotist prefers to risk typos over drag and drop or similar aids.
I remember in the discussion on Me. versus the Bang (!), Pat Hartman saying that she would always use Me. as it enabled her to take advantage of intellisense, GUIs provide similar advantages.

I've written code bit by bit peering into an old VDU screen but who wants to regress to the 60s


Brian
 
I quoted him mostly because he is bang on... You use the GUI to make things that are -relatively- easy but when it comes down to it... and you need to do some complicated stuff.... Or even something like a TOP 10 query, you just cannot do it in the GUI or using Macro's.

You have to get down and dirty with the nitty gritty code. And I think a lot of 'people' run into issues becuase they think they are ALL THAT because they can make a macro or two... :rolleyes:
 
OK Mailman I accept your later post. It is infact important that users understand what the GUIs in the form of wizards ,query grids, etc, create because as you say they cannot do everything, and sometimes what they do do is not the best, however that is different from bypassing them altogether.

Brian
 
The GUI is wonderful, but I spend 80% of my time in SQL. I use the GUI to write the majority of the SQL then I "fix" it. Not sure how you would get the "order by" clause right in the GUI.

My version(s) of Access have a "top" GUI tool.

I had the same problem with the "SQL" view tool icon. Has anyone figured out how to make SQL View available without first opening in design view.

Rokuk, FWIW, I've found that if I close a query while in the SQL view, it is the default view when you open in design view.
 
Found a way to make shortcut active

I think I may have found a way. First, right-click on toolbar choose "customize". Then on toolbars tab Menu Bar should be checked, click on "New". Name a new toolbar button. A small toolbar pops up to the right. It can be docked on top of the screen or to the right, or it can be left floating. Click on the arrow on the menu bar you just created. Choose "Add or remove buttons" -> "customize". On the customize menu go to commands tab and choose Query Design for Categories and drag the "SQL View" button onto the toolbar you made.
 
Found a shortcut (but not keyboard shortcut)

Huh. Imagine that. Well maybe I will have to go back and give it a second try sometime.


In related news, I think I may have found a way. It's not a key shortcut, but it looks like you can add a custom button to the top 'database' group of icons for Queries. I hadn't played around with this before, so maybe someone more familiar could be of help.


I right-click the toolbar icons, hit Customize, and on the Commands tab I choose "Query Design" and hit the button to Rearrange Commands. On the new screen, I hit "Add" and on the next screen I choose "Query Design" as the Category. There, you can scroll down the list on the right and they list things such as "SQL View" and "Select Query."

If I add those buttons, I see them on the toolbar, but they are never -not- greyed out. So I see them, but can't use them. I've tried doing it with focus on the Queries list, with a query open, with nothing selected... but never is the button "usable." My hope is that I could maybe press it and it would either pop open a blank query window in SQL View, or a new SELECT query window... I'm not sure if that's what those buttons being added to the toolbar would actually -do- but not being able to use them at all is probably not right either ; )


Anyone have any insight into this? Thanks !!

:)

Pls see my post at bottom of the page!
 
Because they are proficient at writing SQL queries?

To correlate it to Operating Systems it is the old argument "why use a command line when you have the GUI?" The answer is of course you usually can do more with a command line prompt.

As you suggested you don't always get what you want from design view. People who have experience with other databases find it easier to write straight SQL. I use the design view also but only when it is a quick and dirty query. I usually refine it in SQL view later on.

Just my 2 cents.
I fully agree
 
Is there a keyboard shortcut to open a new query in SQL view?

I find myself encouraging carpal tunnel by:
> going to "queries"
> "new query"
> "design view"
> closing the "show table" dialog box
> right clicking the new query
> finally selecting "SQL view".


There has GOT to be an easier way that this 6-step process to ~run a query~ in a _database_ ... but I haven't run across it yet though. Any help here? My wrist thanks you ; )


I'm using 07 and instead of making a bunch of keyboard shortcuts, they've built a bunch of key combinations to do pretty much anything, i think that's the beneifit of this system is there's so many menu items, this allows them all to be accessed and not require user to remember 100's of keyboard shortcuts. So... Alt + R will bring up the menu shortcuts and i think its W, Q...Wa~la! it's very helpful just to know the Alt + R part b/c from there you can go anywhere. I know this is an old post but i hope this helps, i just today finally gave up on always clicking away to get there and i'm glad i looked into it. Hope that works for ya! Oh by the way, I don't think there's a keyboard shortcut from the main db view, to use my method you have to be in design mode-query...so if you can find a shortcut to open query in design mode - which is a menu option (obviously i'm sure you know that button from the design tab)....so from the query design window (or any other) Alt + R and wherever from there - please let me know if this was useful, i'm just curious if there's any point to responding to old posts like these. Thx
 
Last edited:

Users who are viewing this thread

Back
Top Bottom