DECLARE
TYPE ARRAY_TYPE IS TABLE OF VARCHAR2(20);
mno_array ARRAY_TYPE;
mno_id VARCHAR2(20);
BEGIN
SELECT *
BULK COLLECT
INTO mno_array
FROM (SELECT DT_PARTY.HOST_MNO_ID FROM RESOURCE_DB.HT_SIM_PARTY, RESOURCE_DB.DT_PARTY
WHERE HT_SIM_PARTY.PARTY_ID = DT_PARTY.PARTY_ID
AND HT_SIM_PARTY.SIM_ID = 'SIM_0000000000000184');
DBMS_OUTPUT.PUT_LINE('count='||mno_array.COUNT);
FOR i in 1 .. mno_array.COUNT
LOOP
DBMS_OUTPUT.PUT_LINE(mno_array(i));
END LOOP;
END;
Tuesday, November 13, 2012
PL/SQL SELECT into array
PL/SQL SELECT into hash array
DECLARE
TYPE HASH_TYPE IS TABLE OF NUMBER INDEX BY VARCHAR2(20);
mno_array HASH_TYPE;
mno_id VARCHAR2(20);
BEGIN
FOR r IN (SELECT DT_PARTY.HOST_MNO_ID FROM RESOURCE_DB.HT_SIM_PARTY, RESOURCE_DB.DT_PARTY
WHERE HT_SIM_PARTY.PARTY_ID = DT_PARTY.PARTY_ID
AND HT_SIM_PARTY.SIM_ID = 'SIM_0000000000000184') LOOP
MNO_ARRAY(R.HOST_MNO_ID) := 1;
END LOOP;
IF mno_array.EXISTS('BT') THEN
DBMS_OUTPUT.PUT_LINE('BT=YES');
END IF;
END;
Monday, November 12, 2012
Install Mountain Lion
Conf.: Asus P8Z68V LX + Intel Core i5 2500K + RAM Patriot PC3-12800 1600MHz 8GB (2x4GB) + nVidia GT240 512MB GDDR5
- Install patched ASUS BIOS v4003 so as to allow for Sleep to work
- Create a bootable USB flash drive with Mountain Lion like explained here: UniBeast: Install OS X Mountain Lion on Any Supported Intel-based PC
- Boot on USB flash drive: <TAB>, then PCIRootUID=0
- Format disk as Mac OS Extended (journaled), options: GUID Partition Table
- Install ML
- Upgrade to 10.8.2
- Download tonymacx86 MultiBeast 5.1.3
- Check options as shown:
- Reboot, no option
- Et voila: a fully working hackintosh with sleep capability on and no DSDT
- Keyboard: In order to map my Dell keyboard w/ GB layout, used the wonderful Ukelele w/ Logitech GB layout
Sunday, November 11, 2012
Install a QNAP network HP C5280 printer on Windows 8
Thank you Mr MS for not including the HP C52xx driver into W8.
Download the mostly useless HP software for this printer (362MB!): you will find it easily with Google on the HP website.
Open the HP .exe in WinRAR, and uncompress it.
Goto Panneau de configuration
Then goto Materiel et audio, then "Peripheriques et imprimantes"
Then click on "Ajouter une imprimante"
Then don't let the search finish and click the "L'imprimante que je veux n'est pas repertoriee" link
Enter the name of the QNAP printer:
http://192.168.1.102:631/printers/qnapPR3
then click on "Suivant"
Then select the driver from disk. For this, in HP directory, go into prn_x86 (prn_x64) and select prnhp003.inf
Throw away all the HP bloatware.
Download the mostly useless HP software for this printer (362MB!): you will find it easily with Google on the HP website.
Open the HP .exe in WinRAR, and uncompress it.
Goto Panneau de configuration
Then goto Materiel et audio, then "Peripheriques et imprimantes"
Then click on "Ajouter une imprimante"
Then don't let the search finish and click the "L'imprimante que je veux n'est pas repertoriee" link
Enter the name of the QNAP printer:
http://192.168.1.102:631/printers/qnapPR3
then click on "Suivant"
Then select the driver from disk. For this, in HP directory, go into prn_x86 (prn_x64) and select prnhp003.inf
Throw away all the HP bloatware.
Sunday, November 4, 2012
Install Mountain Lion from InstallESD.dmg
You won't be able to use UniBeast directly with InstallESD.dmg:
Open dmg, and move "Install OS X Mountain Lion" into Applications folder: Then right click on "Install OS X Mountain Lion", and select "Show Package Contents".
Go into Contents folder, and create a new folder named "SharedSupport": Then drag InstallESD.dmg into SharedFolder: You will then be able to proceed through UniBeast: Install OS X Mountain Lion on Any Supported Intel-based PC
Open dmg, and move "Install OS X Mountain Lion" into Applications folder: Then right click on "Install OS X Mountain Lion", and select "Show Package Contents".
Go into Contents folder, and create a new folder named "SharedSupport": Then drag InstallESD.dmg into SharedFolder: You will then be able to proceed through UniBeast: Install OS X Mountain Lion on Any Supported Intel-based PC
Saturday, November 3, 2012
FCPX: Use Disk Images to archive your work
Managing Your FCP X Events & Projects using Disk Images
Then you can move your projects to your Disk Image in order to archive them:
Then you can move your projects to your Disk Image in order to archive them:
Monday, September 24, 2012
Wednesday, September 12, 2012
Friday, August 31, 2012
Oracle views vs. materialized views
- Materialized views are disk based and updated periodically base upon the query definition.
- Views are virtual only and run the query definition each time they are accessed.
Thursday, August 23, 2012
Count rows in partition
SELECT table_name,
partition_name,
high_value,
num_rows
FROM all_tab_partitions
ORDER BY table_name, partition_name;
Monday, July 2, 2012
VirtualBox Guest additions upgrade: install_x11_startup_app: no script given
Here's what we get after trying to upgrade the Guest Additions from 4.1.12 to 4.1.14:
Installing the Window System drivers
Installing X.Org Server 1.11 modules ...done.
Setting up the Window System to use the Guest Additions ...done.
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.
Installing graphics libraries and desktop services components ...fail!
(See the log file /var/log/vboxadd-install-x11.log for more information.)
Press Return to close this window...
install_x11_startup_app: no script given
Before installing the new guest additions version, you need to remove manually 2 symlinks:
rm /usr/lib64/VBoxGuestAdditions
rm /usr/share/VBoxGuestAdditions
Labels:
virtualbox
Monday, June 18, 2012
Have ALC887 work on Lion 10.7.4
Follow the instructions on https://tonymacx86.com/viewtopic.php?f=16&t=59061 for installing 887_v100302
Tuesday, June 12, 2012
Wednesday, June 6, 2012
NO DATA FOUND error
Trap the NO_DATA_FOUND exception, and handle it.
BEGIN
SELECT ... INTO x_data
FROM ...
WHERE ...;
EXCEPTION
WHEN NO_DATA_FOUND THEN
x_data := NULL;
END;
Monday, June 4, 2012
Wednesday, May 30, 2012
Monday, May 14, 2012
Oracle select N latest entries
select * from (select * from monitor.at_process_log order by log_id desc)
where ROWNUM <=10;
To accomplish the equivalent to MySql:
select * from sometable order by name limit 20,10
AskTom proposes:
select * from (select a.*, ROWNUM rnum from
(select * from monitor.at_process_log order by log_id desc) a where rownum <= 20)
where rnum >= 10;
Subscribe to:
Posts (Atom)







