Hi,
Short question : how do I replace a value (that is the ID of a message) in an SQL?
More info,
tables involved:
Quote:
tblGauge
- ID int(5)
- condition int(5)
- level (5)
tblConditions
- ID int(5)
- description varchar(50)
|
to call all the gauge readings, I'd use something like
Quote:
|
Select ID, condition, level from tblGauge order by level.
|
Whare tblConditions.ID has a one-to-many reation with tblGauge.condition.
If, in tblGauge, the condition is - say - 5, the 5 should be replaced with the fifth message (ie tblConditions.ID = 5) in tblConditions.
I _could_ run the SQL and then replace de integer value with a message for each line individually and then put the whole in the DefaultTableModel, but that is ... silly.
Can SQL do that for me? Yes! How? I dont know.
And direction is appreciated...
Tnx in advance!
Thor