Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Bellus
Starting Member
29 Posts |
Posted - 2007-10-17 : 04:21:02
|
I am creating a view for the table:bellus=# select * from host_application_definition; id | type_value | connection_value | group_value | application_value | host ----+------------+------------------+-------------+-------------------+----From the table meta_host_types; id | value | types | name ----+-------+-----------+-------- 1 | agm | host-type | RencidI would like to seperate value into type_value and connection_value, because it holds both values.Any tip?bellus=# \d host_application_definition; Table "public.host_application_definition" Column | Type | Modifiers -------------------+---------+-------------------------------------------------------------------------- id | integer | not null default nextval('host_application_definition_id_seq'::regclass) type_value | integer | connection_value | integer | group_value | integer | application_value | integer | host | integer | Indexes: "host_application_definition_pkey" PRIMARY KEY, btree (id)Foreign-key constraints: "host_application_definition_application_value_fkey" FOREIGN KEY (application_value) REFERENCES appsmarteye(id) "host_application_definition_connection_value_fkey" FOREIGN KEY (connection_value) REFERENCES meta_host_types(id) "host_application_definition_group_value_fkey" FOREIGN KEY (group_value) REFERENCES meta_host_grouptypes(id) "host_application_definition_host_fkey" FOREIGN KEY (host) REFERENCES master_hosts(id) "host_application_definition_type_value_fkey" FOREIGN KEY (type_value) REFERENCES meta_host_types(id)\d meta_host_types; Table "public.meta_host_types" Column | Type | Modifiers -------------+---------+--------------------------------------------------------------------- id | integer | not null default nextval('meta_types_application_id_seq'::regclass) application | integer | value | text | comments | text | types | text | Indexes: "meta_types_application_pkey" PRIMARY KEY, btree (id) "meta_host_types_id_key" UNIQUE, btree (id) "meta_host_types_value_key" UNIQUE, btree (value, application) "meta_host_types_value_key1" UNIQUE, btree (value)Foreign-key constraints: "meta_types_application_application_fkey" FOREIGN KEY (application) REFERENCES appsmarteye(id) |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-10-17 : 04:24:41
|
Are you still using MYSQL? E 12°55'05.25"N 56°04'39.16" |
 |
|
Bellus
Starting Member
29 Posts |
Posted - 2007-10-17 : 04:32:21
|
no psql... |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-17 : 04:54:37
|
Try posting at Oracle forums www.dbforums.comMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|