473,464 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Double Join Key Map, possible?

dlite922
1,584 Expert 1GB
I'm in need of a map with two "joint" or "combined" integer keys pointing to a value (an object).

map[K1,K2] = myObject


What I have to do now is combine the two in a string separated by a comma: "105-12"

Combined they are unique. There will only be one 105,12 key combo.

possible? Should I just string them with a dash?


Thanks,


Dan
Oct 28 '10 #1
3 2862
Dheeraj Joshi
1,123 Expert 1GB
As far as you have key and value pair you can do it.

It do not matter whether key is a String or an integer. You can combine two integers to a string and use it as key.

Regards
Dheeraj Joshi
Oct 29 '10 #2
dlite922
1,584 Expert 1GB
Sorry, if I wasn't clear.

My question was that if it was at all possible withOUT converting it to a string.

I.e. Is it possible for a value to have 2 keys without having each key separately pointing to their own value.

Pseudo code:

Is something like this possible:
Map[536,99] = myObject;

I already I know I can do both of these:
map['539-99'] = myObject;

or

map[539] = myObject;
map[99] = myObject;

Hope I made myself more clear.

Thanks,

Dan
Oct 29 '10 #3
Dheeraj Joshi
1,123 Expert 1GB
Are you looking for this?

Regards
Dheeraj Joshi
Oct 29 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Denis St-Michel | last post by:
Hello All, Hope some Guru will be able to help me with this. Let's take this example table A ------------------------------------------------------------------------------- id | ...
2
by: Vector | last post by:
I have this working fine in Access and MSSQL. While trying to convert to MySQL the result is not what I'm looking for to get.. Two tables: T1 ---------------- ID1|cName |...
6
by: Allan | last post by:
Please help, below is my problem. Let's say I have 2 tables, a Products table and a Colors table that go as follow: Table Products prodID Name 1 shirt 2 tshirt
3
by: Ian Boyd | last post by:
i know nothing about DB2, but i'm sure this must be possible. i'm trying to get a client to create a view (which it turns out is called a "Logical" in DB2). The query needs a LEFT OUTER JOIN, but...
3
by: deko | last post by:
From what I understand, an Inner Join narrow the rows selected to the table with the least results... and an Outer Join does the opposite... SELECT qryTxToQ1.Q1Total, qryTxToQ2.Q2Total,...
5
by: Randy Harris | last post by:
Using an outer join, a query can return all records from Table1 and only those matching from Table2 (or vice versa). How can I write a query that will return unmatched records from both sides? ...
1
by: Justin | last post by:
Hello, I have a scenario where I have unique identifiers in about 25 tables, each table has varying fields - eg. Table #1 Table #2 Table #3 Table #4 --------- ...
52
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
1
by: dikkuuhh | last post by:
At the moment i have this query: SELECT number, COUNT( * ) as count ' . FROM visit ' . RIGHT JOIN visitHit ON ( visitHit.visitId = visit.id ) AND ( type = "link" ) WHERE ( brochureId = 57 )...
1
by: Vivienne | last post by:
Hi there This is a hard problem that I have - I have only been using sql for a couple of weeks and have gone past my ability level quickly! The real tables are complex but I will post a simple...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.