User Tools

Site Tools


how_to:writesqlqueries

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
how_to:writesqlqueries [2010/01/04 17:16]
132.168.74.230
how_to:writesqlqueries [2010/02/03 11:36] (current)
132.168.74.230
Line 1: Line 1:
 ====== How to write SQL Queries to explore database ====== ====== How to write SQL Queries to explore database ======
  
-Once the [[how to:dbconnection|connection]] is successfulthe first simple feature is to explore the database ​or create ​SQL queries. Information on MSI database and its model is available [[http://​biodev.extra.cea.fr/​docs/​irma/​doku.php?​id=msidb| here ]].+Once you are opened an [[how to:opensession|MSI session]], you can explore the database ​by creating ​SQL queries. Information on MSI database and its model is available [[http://​biodev.extra.cea.fr/​docs/​irma/​doku.php?​id=msidb| here ]].
  
-You can create new SQL files from hEIDI project (''​File > New File'' ​menu then choose ​''​Empty File'' ​or directly ''​New Empty File''​ from hEIDI Project window) . It is also possible to select ​Table under database connection ​and choose ''​Veiw Data''​.+===== View data from a table ===== 
 +It is possible to view data from a table like this:\\ 
 +  * In the ''​Services'' ​Window, select a database connection 
 +  * Expand the schema node of your choice, ​then the ''​TABLES'' ​node 
 +  * Select ​table, right-click ​and choose ''​View data'' ​to display table values
  
 {{:​sql_comment.png|}} {{:​sql_comment.png|}}
  
-** SQL queries ​sample **+===== Create your own SQL query ===== 
 +To create a new SQL file from an hEIDI project, select the ''​File > New File''​ menu, then choose ''​SQL File''​ under the ''​Other''​ Category.\\ 
 +Specify a name and a project folder then ''​Finish''​. An empty SQL file appears on the screen. \\ 
 +Select your database in the droplist at the top.\\ 
 +{{:​how_to:​sqlquery_choosedb.png|}} 
 + 
 +When you query is written, you can execute it using the ''​Run SQL''​ icon: 
 + 
 +{{:​how_to:​sqlquery_execute1.png|}} 
 + 
 +If you have several ​queries ​in your file, you can select one to execute, then right-click on it and choose ''​Run Selection'':​ 
 + 
 +{{:​how_to:​sqlquery_execute2.png|}} 
 + 
 +If your query executed successfully,​ the result will display in a table.\\ 
 +If needed, see [[how_to:​exportsqlresult|how to export an SQL result to a file]]. 
 + 
  
  
how_to/writesqlqueries.1262621792.txt.gz · Last modified: 2010/01/04 17:16 by 132.168.74.230