Extract(Read) > Transform(Test&Apply) > Load(Learn) Blog

December 29, 2006

Happy bayram and new year!

Filed under: Other — H.Tonguç Yılmaz @ 1:23 pm

This year our religious “Kurban Bayramı” and the new year celebrations joined :) Tonight we are starting for a five day holiday, great opportunity to rest, think on last year and plan the new coming.

This year different then previous ones, I wish everyone all around earth more peace..

I hope 2007 will be very happy and successfull new year for you :)
Best regards.

Happy new year!


-- another interesting way to wish happy new year :)
drop table twhat_humans_expect purge ;
create table twhat_humans_expect ( vexpectations varchar2(32) primary key ) ;
insert into twhat_humans_expect values ( 'Peace' );
insert into twhat_humans_expect values ( 'Health' );
insert into twhat_humans_expect values ( 'Success' );
insert into twhat_humans_expect values ( 'Money' );
insert into twhat_humans_expect values ( 'New friends' );

drop table tall_friends purge ;
create table tall_friends ( vfriends varchar2(32) primary key ) ;
insert into tall_friends values ( 'My family' );
insert into tall_friends values ( 'TurkcellStaj@yahoogroups.com' );
insert into tall_friends values ( 'oracleturk@yahoogroups.com' );

CREATE OR REPLACE PROCEDURE prc_happy_new_year(p_cursor SYS_REFCURSOR, p_vfriend varchar2) IS
TYPE array_t IS TABLE OF VARCHAR2(32) INDEX BY BINARY_INTEGER;
rec_array array_t;
BEGIN
FETCH p_cursor BULK COLLECT
INTO rec_array;
FOR i IN rec_array.FIRST .. rec_array.LAST LOOP
dbms_output.put_line('Wish '||rec_array(i)||' to '||p_vfriend||' @ 2007 :)');
END LOOP;
END prc_happy_new_year;
/

set serveroutput on
DECLARE
rec_array SYS_REFCURSOR;
BEGIN
FOR cur IN (SELECT vfriends FROM tall_friends) LOOP
OPEN rec_array FOR 'SELECT vexpectations FROM twhat_humans_expect';
prc_happy_new_year(rec_array,
cur.vfriends);
CLOSE rec_array;
END LOOP;
END;
/

Wish Peace to My family @ 2007 :)
Wish Health to My family @ 2007 :)
Wish Success to My family @ 2007 :)
Wish Money to My family @ 2007 :)
Wish New friends to My family @ 2007 :)
Wish Peace to TurkcellStaj@yahoogroups.com @ 2007 :)
Wish Health to TurkcellStaj@yahoogroups.com @ 2007 :)
Wish Success to TurkcellStaj@yahoogroups.com @ 2007 :)
Wish Money to TurkcellStaj@yahoogroups.com @ 2007 :)
Wish New friends to TurkcellStaj@yahoogroups.com @ 2007 :)
Wish Peace to oracleturk@yahoogroups.com @ 2007 :)
Wish Health to oracleturk@yahoogroups.com @ 2007 :)
Wish Success to oracleturk@yahoogroups.com @ 2007 :)
Wish Money to oracleturk@yahoogroups.com @ 2007 :)
Wish New friends to oracleturk@yahoogroups.com @ 2007 :)

Testing Information : the scripts mentioned are tested on Oracle Database 10g Express Edition Release 10.2.0.1.0

Refences Used : Our manager Mr.Yucel Karadeniz’s celebration email to Turkcell R&D Software Development department;


TYPE Insanoğlu_ne_bekler IS SET {huzur, mutluluk, sağlık, yeni_heyecan, para, takdir, terfi,...},
DECLARE Yeniyıl[1 TO LENGTH RDSD] IS TYPE Insanuğlu_ne_bekler;
DO every_friend = 1 TO LENGTH RDSD;
INITIALIZE Yeniyıl[every_friend] IS VALUE “yeni_heyecan”
END DO;

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: