Oracle and getting Milliseconds from Sysdate… [Systimestamp]

First, you can’t.

Sysdate doesn’t support going to milliseconds.  However, starting with Oracle 9, you can getting milliseconds from another system source : SYSTIMESTAMP.

SELECT to_char(sysdate, 'HH24:MI:SS'), to_char(systimestamp, 'HH24:MI:SS.FF6') FROM dual;

Powered by Qumana

Advertisements
Posted in Oracle | 4 Comments

Oracle SELECT with an array using an IN

SELECT with an array with an IN

declare

    — CREATE OR REPLACE TYPE PROD_TYPES.TYPE_NUMBER_ARRAY AS TABLE OF NUMBER
    nt_src     prod_types.type_number_array := PROD_TYPES.TYPE_NUMBER_ARRAY();    — Constructor     
    nt_dest     prod_types.type_number_array := PROD_TYPES.TYPE_NUMBER_ARRAY();    — Constructor     

begin

    — Test data (no order)
    select
        product_version_id
    bulk collect
    into
        nt_src
    from product_version v
    where v.product_version_id between 138120 and 140000;

    — select * from table(sys.dbms_debug_vc2coll(1,2,’a’)) order by 1 desc
    
    — Data ordered
    select
        product_version_id
    bulk collect
    into nt_dest
    from
         product_version
    where
        product_version.product_version_id in (select column_value from table(cast(nt_src AS prod_types.type_number_array)))
    order by
        product_version.expiration_date2 desc,
        product_version.base_price desc,
        product_version.expiration_date2 desc;

    for i in nt_dest.first .. nt_dest.last loop
        dbms_output.put_line(to_char(nt_dest(i)));
    end loop;

    exception
        when others then
            dbms_output.put_line(‘sqlerrm : ‘||sqlerrm);
end;

Powered by Qumana

Posted in Oracle | 3 Comments

ActiveSync Issues

Well, I ran into some ActiveSync issues last night.

Basically, I was working with MicroTorrent, and wanted to see what my Windows Firewall settings were.  I had the firewall off, but when Windows realized that I "looked" at the settings it decided to turn on the Firewall.  Basically, after turning the Firewall off and several reboots later I finally started syncing again.  What’s weird is that the Firewall has the entries to allow ActiveSync.

ErrorCode : 80070008

http://www.mtekk.com.au/Forums/tabid/56/forumid/17/postid/48412/view/topic/tpage/3/Default.aspx

If you are using a software firewall on your PC, you need to allow ActiveSync to use TCP/IP.
ActiveSync uses the programs WCESCOMM.EXE, WCESMGR.EXE, RAPIMGR.EXE, and CEAPPMGR.EXE.

TCP/IP ports:

  •  990 (RAPI)

  • 999 (Status)

  • 5678 (Legacy Replication)

  • 5679 (Legacy Replication)

  • 5721 (Desktop Passthrough)

  • 26675 (AirSync)

The WM5 ‘Device’ is the DHCP server, thus the device has the IP address of 169.254.2.1 (Default) and the PC obtains the IP address of 169.254.2.2 (Default) [thanks to Brian for the update].

Powered by Qumana

Posted in ActiveSync, T-Mobile MDA, WindowsMobile5 | 1 Comment

WindowsMobile Links to Review

Powered by Qumana

Posted in T-Mobile MDA, WindowsMobile5 | Leave a comment

WindowsMobile Links of Relevance

Powered by Qumana

Posted in T-Mobile MDA, WindowsMobile5 | Leave a comment

Determine IP address of a VM Ware Player sessions running a Linux distribution

Recently, I started playing with VMWare Player (http://www.vmware.com/products/player/).  I do some work in Unix/Linux, but not a lot.  I’ve always been able to do what I needed, however I couldn’t remember what it took to determine what the IP address of machine was.  The documentation said : "http://your.vm.ip.address/".  Damn, how?

Hence this post,

Command line: ifconfig eth0

Powered by Qumana

Posted in Virtualization | Leave a comment

T-Mobile Accessories

Well, I can say that I am very disappointed that I can’t find anyone that carries a silicon case for US version of the MDA.  If anybody finds one, leave me a post / comment.

Powered by Qumana

Posted in T-Mobile MDA | Leave a comment