 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
pravindpatil
Joined: 02 Jan 2007 Posts: 2
|
|
TableName.ColumnName Selection Facility in Drop Down List |
|
Currently i am able to select only column name from list.
i want to select "Table/View Name"."Column Name" in drop down list.
i don't want to type table/view name all time.
please help me to solve out my problem.
|
|
Wed Jan 03, 2007 2:50 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
It all depends how you enter it. The pasted value can consist of column, alias and column, table and column, schema and table and column parts depending on how tables are referenced in the FROM or JOIN clauses (similar in INSERT, DELETE and UPDATE).
Examples
1. Column name only
SELECT * FROM MyTable WHERE {popup here} select MyColumn and you get something like
SELECT * FROM MyTable WHERE MyColumn = 5
2. Alias and column name
SELECT * FROM MyTable AS tab WHERE {popup here} select MyColumn and you get something like
SELECT * FROM MyTable WHERE tab.MyColumn = 5
3. Two tables
SELECT * FROM MyTable1, MyTable2 WHERE {popup here} select MyTable1 column MyColumn and you get something like
SELECT * FROM MyTable1, MyTable2 WHERE MyTable1.MyColumn = 5
then type AND
SELECT * FROM MyTable1, MyTable2 WHERE MyTable1.MyColumn = 5 AND {popup}
after that select MyTable2 column MyColumn2 and you get something like
SELECT * FROM MyTable1, MyTable2 WHERE MyTable1.MyColumn = 5 AND MyTable2.MyColumn2 = 10
4. Two tables with fully qualified names and 1 alias
SELECT * FROM Schema1.MyTable1 JOIN Schema1.MyTable2 AS tab2 ON {popup here} select "MyTable1.MyColumn = MyTable2.MyColumn" and you get
SELECT * FROM Schema1.MyTable1 JOIN Schema1.MyTable2 AS tab2 ON Schema1.MyTable1.MyColumn = tab2.MyColumn
Hope this helps.
Also, in case if you work with Oracle and selected tables or column names contain spaces then SQL Assistant automatically encloses such names in double quotes (for example, "My Column"). In case if you work with SQL Server and selected tables or column names contain spaces then SQL Assistant automatically encloses them in brackets (for example, [My Column]).
|
|
Wed Jan 03, 2007 9:07 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|