Microsoft
Software
Hardware
Network
Question : Creating a simple Stored Procedure to check a range value
Hi All,
I have two tables.
One holds a field called child and the other holds 3 fields Parent, Range1 and Range2
Table 1
Child
10
Table 2
Parent |Range1| Range2
P1 | 5 | 15
I want to do this...
If Table1.Child
between Table2.Range1 to Table2.Range2
Then choose the appropriate parent
So
if 5 between 5 & 15 then P1
Any help greatly appeciated.
Answer : Creating a simple Stored Procedure to check a range value
maybe something like this:
CREATE OR REPLACE FUNCTION getParent(p_child number) return number is
v_parent number;
begin
select parent into v_parent from table2 t2 where p_child between t2.range1 and t2.range2;
return v_parent;
end;
Random Solutions
How is the transition made between 2 Classic ASP pages?
Update field in table with unbound field on form.
IBM Setup Disc for x3400 Server
MAC, OS 10.4: How to Remote access (like VNC) without installing a software
Copy active sheet to email body save to draft folder
Visual Studio 2010 Hotkey Underline not showing up
Terminal Server license settings
Store date in sql table as yyyy/mm/dd hh:mm:ss using type DATETIME.
Script that works as a login script need to query on a list of machine names in a txt file.
export data from outlook body to excel