SQL - need some help, tnx
Short question : how do I replace a value (that is the ID of a message) in an SQL?
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!
Phrasing it as "replace a value" was confusing; at first I thought you were asking about the UPDATE statement.
If I understand correctly, you want:
That could be it! Joins (as in left join, inner and the like) always escaped me...
The result could then me something like:
1 severe 15
2 mild 5
where the tblConditions.ID as 15 would have "severe" as description and the one with 5 "mild"
You've saved my Sunday here!
I tested this and it works like a charm!
|All times are GMT -5. The time now is 01:56 AM.|