| Join on TABLE OF NUMBER passed as a parameter to a function [message #645615] |
Wed, 09 December 2015 17:02  |
 |
Sam D.
Messages: 17 Registered: December 2015 Location: USA
|
Junior Member |
|
|
Hi! I googled but cannot seem to find this. Perhaps I used wrong lingo.
I need to pass a variable length list of IDs to my function and then
JOIN the list in my select statement.
Any ideas/sample/suggestion is greatly appreciated in advance.
|
|
|
|
|
|
|
|
| Re: Join on TABLE OF NUMBER passed as a parameter to a function [message #645668 is a reply to message #645618] |
Thu, 10 December 2015 12:23   |
 |
Sam D.
Messages: 17 Registered: December 2015 Location: USA
|
Junior Member |
|
|
Hi! Sorry for late reply. I could not connect to internet.
By "list of ids" I meant a list my UI will send of records I need to retrieve. Let's say I have a table called Part.
There are parts with IDs in that table. Let's say I need to retrieve parts whose ids are 1,4,66,89 (ids and the number of ids can chance)
SELECT * FROM Part p WHERE p.ID IN (1,4,66,89 etc)
Based on my research I know I can pass a table of number. But I am not clear how to join on that table of number
Is there anything like
SELECT * FROM Part p
JOIN p_MyTableOfNumberContainingIds on p.ID = MyTableOfNumberContainingIds.ID
?
Many thanks in advance,
[Updated on: Thu, 10 December 2015 12:24] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|