[AccessD] Tagged value query

Bruen, Bruce Bruce.Bruen at railcorp.nsw.gov.au
Mon Aug 15 21:06:39 CDT 2005


Might not be expressing myself well here. 

On reconsidering the problem, I can ignore the join completely.

What I have is a table with a set of optional tagged value pairs:
Table=t_objectproperties
Attribs= 
Objkey (NOT unique)
parentID (FK but lets ignore it)
Name (name of the tag)
Value (value of the tag)

Objkey can have mulitple entries.  What I need to do is:


For a given set of tag names (i.e. more than 1, eg "InFirstRelease" and
"TestPriority")
 list ObjKey, name1.value, name2.value;

The case of a single translation putting the value of a particular name
in a column is trivial.  IOW its easy to get:

Objkey	InFirstRelease
-------	---------------
2313		Yes
2365		No
...

What I cant get is how to do it for multiple tags. :-(
Initially, I can get away with a fixed number of tags. But in the long
term it would be nice to be able to have a generalisation that allowed
the number of tags to be variable.

SELECT objkey, value as V1, value as V2
FROM t_objectproperties
WHERE name="InFirstRelease" or name="TestPriority";  ????????Obviously
not it!????????

I must be getting too old for this job.....


Tia
bruce





-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Friday, 12 August 2005 3:02 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Tagged value query

Have you tried an outer join? 

Left outer will retrieve all the primary key values in the one table. 
Right outer will retrieve all the foreign key values in the many table. 

Susan H. 

Yes. 

You want all objects, even if they have no tags? 


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
 
 
This e-mail and any attachments may contain confidential information that is intended solely for the use of the intended recipient and may be subject to copyright. If you receive this e-mail in error, please notify the sender immediately and delete the e-mail and its attachments from your system.  You must not disclose, copy or use any part of this e-mail if you are not the intended recipient.  Any opinion expressed in this e-mail and any attachments is not an opinion of RailCorp unless stated or apparent from its content. RailCorp is not responsible for any unauthorised alterations to this e-mail or any attachments. RailCorp will not incur any liability resulting directly or indirectly as a result of the recipient accessing any of the attached files that may contain a virus.



More information about the AccessD mailing list