T
TheDude5B
Hi,
I have two tables. One table contains the information about the object,
and then the other table contains the objects ID and then the ID of
where this object is allocated to.
table one Object: ObjectID, ObjectName.
table two Allocated: siteID, ObjectID.
now the ObjectID in table two will appear many times depending on how
many sites it is allocated to. So here lyes my problem. I want to be
able to check table two to see which Objects are allocated, and then
display the Object Information from table one.
I can select the data just now, but because the Object appears in table
two multiple times, it will display the Object information multiple
times also. I only want it to be displayed once.
Is there some sort of IF statement which I can implement into my SQL
Stored Procedure which says something like
SELECT ONE tblOne.ObjectID, tblOne.ObjectName FROM tblOne INNER JOIN
tblOne ON tblTwo.ObjectID = tblOne.ObjectID ?
my advanced SQL is not as good as it should be, so it would be a great
help if someone knows how I could implement this.
Thanks...
I have two tables. One table contains the information about the object,
and then the other table contains the objects ID and then the ID of
where this object is allocated to.
table one Object: ObjectID, ObjectName.
table two Allocated: siteID, ObjectID.
now the ObjectID in table two will appear many times depending on how
many sites it is allocated to. So here lyes my problem. I want to be
able to check table two to see which Objects are allocated, and then
display the Object Information from table one.
I can select the data just now, but because the Object appears in table
two multiple times, it will display the Object information multiple
times also. I only want it to be displayed once.
Is there some sort of IF statement which I can implement into my SQL
Stored Procedure which says something like
SELECT ONE tblOne.ObjectID, tblOne.ObjectName FROM tblOne INNER JOIN
tblOne ON tblTwo.ObjectID = tblOne.ObjectID ?
my advanced SQL is not as good as it should be, so it would be a great
help if someone knows how I could implement this.
Thanks...