Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Sql Baffeled

$
0
0
I am sorry for the brevity, but because of where I work, I can only put this up and I am limited. I can't figure out the SQL
I have 2 tables:
--recordCrossSystem
ID
RecordID
CrossSysID
--Record
ID
RecordNum
recordNum
Title
recordCrossSystem Example
1     100    110
2     100    111
3     100    112
Record Example
1     100   12345	Record 1
2     110   12346	This is the cross system record of 100
3     111   12347	This is the cross system record of 100
4     112   12348	This is the cross system record of 100
So in my application I need to bring back all the records that go with the cross system, but I have to search on recordNum. So if I search for 12348. I have to bring back
1     100   12345	Record 1
2     110   12346	This is the cross system record of 100
3     111   12347	This is the cross system record of 100
4     112   12348	This is the cross system record of 100
and if I search for 12345 which is the parent record. I have to bring back the same
1     100   12345	Record 1
2     110   12346	This is the cross system record of 100
3     111   12347	This is the cross system record of 100
4     112   12348	This is the cross system record of 100



www.helixpoint.com


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>