Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
You did not specify what database you are using, but for Oracle, something like this will work:
create or replace procedure test1( condition1 varchar2, condition2 varchar2, condition3 varchar2) as
select min(start_time) into lv_min from aps_account where req_name=condition1 and end_date=condition2;
select max(upd_time) into lv_max from aps_account where req_name=condition1 and end_date=condition2;
select min(start_time) into lv_min2 from aps_account where req_name=condition1 and end_date=condition3;
select max(upd_time) into lv_max2 from aps_account where req_name=condition1 and end_date=condition3;
dbms_output.put_line('Server x: ' || lv_min || '|' || lv_max || '|' || lv_min2 || '|' || lv_max2 );
Thanks a lot crabboy...... I am using Sybase as database as I used command "isql -Sserver -Ppassword -o result.csv" in my first post...As per your reply,got an idea how to proceed further...I will try to use that for Sybase.
Hi crabboy.....could you please post the solution for Sybase as well in detail as you provided for the oracle like creating procedure,running it,passing parameters to it etc.as I tried to work on that but getting some errors with Sybase procedure....
select @lv_min=(select min(start_time) from tabel1 where requestor_name= @condition1 and end_date= @condition2)
select @lv_max=(select max(upd_time) from tabel1 where requestor_name= @condition1 and end_date= @condition2)
select @lv_min2=(select min(start_time) from tabel1 where requestor_name= @condition1 and end_date= @condition3)
select @lv_max2=(select max(upd_time) from tabel1 where requestor_name= @condition1 and end_date= @condition3)