I'm using Toad for Oracle for accessing Oracle databases. Is there a possibility to invoke custom scripts from Toad so that you don't always have to type these from scratch? E.g. I would like to create custom script
select count(*) as cnt
from
and invoke this using custom text like
scf
This kind of functionality is found e.g in Redgate's SQL Prompt:
It doesn't tell you how you should write code, either. You can tell
SQL Prompt exactly how you like your SQL, and add your own code
snippets to the customizable library
It is called Code Snippets
Insert Code Snippets:
http://dev.toadformysql.com/webhelp/Content/Editor/Code_Snippets/Code_Snippets.htm
If you defined it correctly then:
"If you know the shortcut name for a snippet, enter the shortcut name
and press CTRL+SPACE."
You can also use auto-replace to solve your problem if it's a single line of text.
I use "sfr" for SELECT * FROM.
As soon as I type "sfr" and press space or tab, it replaces it with SELECT * FROM.
Go to View -> Toad Options -> Editor -> Auto Replace
Go to view, toad options, in the sub editor you should find behaviour, click add on top right pane, and insert your preferred shortcut
Related
I have the following table in SSAS tabular using visual studio.
I would like to find out what source table Customer name uses as it seems to be using a wrong table, but I can't figure out how to find out which table it uses from.
picture of property window
View the properties window. To display this, highlight the table in SSDT then go to View > Properties Window or press F4. After this, find the Source Data field and click the ellipsis next to it. This will open a window that will display either the source table/view, stored procedure EXEC statement, or SQL command that the table is derived from.
In Oracle SQL developer , we have monitor session for real time SQL monitoring. Similarly how to look that in PL/SQL developer?
You can add it to the Session Browser, which is at Tools > Sessions and has an icon like this:
You can launch it from the menu, or add it to the toolbar to make it easier to access in the future. From your screenshot it doesn't seem to be present, so add it:
Right-click on the tool bar
Choose "Customize"
Under the "Toolbars" tab, ensure "Tools" is enabled (yours appears to be)
Under the "Commands" tab, select "Tools", find the "Sessions" icon and drag it to the toolbar.
The Sessions screen consists of a master-detail report where the main panel is (by default) select * from v$session with a couple of variations to filter on "My sessions" or "Active sessions". In my setup I change these to include some more useful information, place the things I want to see quickly near the top, etc. Click the spanner icon to edit the queries.
The default detail tabs include a SQL Monitor report which is based on a query of v$sql_monitor for the current session and displays the HTML format.
I prefer the interactive version so I change HTML to ACTIVE. I also like to be able to see at a glance which row corresponds the currently executing SQL, so I change it to:
select m.status
, m.sql_text
, dbms_sqltune.report_sql_monitor
( sql_id => m.sql_id
, sql_exec_id => m.sql_exec_id
, type => 'ACTIVE'
, report_level => 'ALL' ) as report
from v$sql_monitor m
where m.sid = :sid
and m.session_serial# = :serial#
order by m.sql_exec_start desc
For a RAC environment you might want to change this to gv$sql_monitor.
(Note the 'Active' report includes an 'Overview' section at the top, which you can collapse to give more space to SQL execution details.)
Full walkthrough here, though it was written a couple of years ago so refers to earlier versions of everything, Windows XP etc.
(This was the second in the series, so perhaps you might as well start with plsqldeveloper-setup-1.)
More details about DBMS_SQL_MONITOR.
I am trying to select values from a drop down in my application. Drop down is getting identified as WebEdit in UFT.
Here is the line of code:
Browser().page().WebEdit("html tag:=INPUT","name:=WebEdit").Set "Add Document"
Add Document is a value in dropdown. Apart from "Add document" value, there are more values in drop down. please suggest how can i select those values one by one.
Thanks.
it should be WebList Object in Web application if it's a Dropdown.
I guess it's a Text Box Only in which if you click, multiple suggestion come like MakeMyTrip .
if it's the case you can use two approach.
1) Browser().page().WebEdit("html tag:=INPUT","name:=WebEdit").Set "SomeValue"
or
2) Browser().page().WebEdit("html tag:=INPUT","name:=WebEdit").Set "Someval"
' Then There will be Multiple Sujjestions, Which are nothing but WebElement.
' just click that WebElement
You can use descriptive programming to select values.
That way UFT won't select it as textbox implicitly.
Let me know if you are still facing issues.
From my experience, I guess the drop down you mentioned should be a dynamic one, Meaning a drop down will appear when you type words in that WebEdit column.
If so, my suggestion is that you can write a function to locate object's location (i.e. x,y property), and simulate mouse click the object. Now the object has been activated and you can type words. Use SendKey method to type some keywords you want to select, and use SendKey to press Enter to select it.
It's an ugly solution but sometimes it helps...
Is it possible to use a column picker in JetBrains DataGrip? I was not able to use this feature in DataGrip. For instance, sql complete contains this feature: sql complete column picker image.
Currently, there is no feature like this in DataGrip. I can offer you a couple of workflows:
— Use code completion, it is really fast. Once you have the table in your query (typing SEL → Tab activates Live Template for SELECT query), start typing column names in the list and completion will prompt you column names.
— Use wildcard and then expand it by Alt+Enter → Expand column list. Yo will get the whole column list, just remove unnecessary ones.
— If you need to have a result with some columns, not all of them, press Ctrl+F12 on the result-set. Then you'll get a popup where you can show/hide columns with Space. Notice, that text speed search works there as well. See Operations with columns in the structure view.
All of them are shown in the attached gif file.
In sql express I could setup query shortcuts, so I simply create a "Select * from " shortcut and when I press it with the table name selected it shows me the select result
There's any way I can quick view the table content selecting only the table name in a script?
If I got you right, there are several ways to do what you want:
Ctrl+N (Cmd+O for Mac) → type the name of the table, press Enter
If the cursor is on the name of the table inside the script, press F4.
If the cursor is on the name of the table inside the DB explorer, you can double-clik it or press F4.
If you are in the query console, the quick way to type "SELECT * FROM" is to type "sel" and press Tab. Then put the name of the table and run the query.
In any place, wether it's SQL or database explorer, press Ctrl+Q (F1 for Mac) and you will see the quick documentation window.
Another quick solution can be to put your cursor in the name of your table and press CTRL+Q, this will open the quick documentation, it will show the table structure with the first 10 rows at the end.
I find this faster than running the query.
Double-clicking on a table in the left pane will open the data for the table.