Friday, December 19, 2014

DATE row generator with DBMS_SCHEDULER

A recent question on the Oracle-L mailing list was about generating dates in a given period. If you had a string like 'MWF', all Mondays, Wednesdays and Fridays between the from- and to-dates should be generated.

That reminded me of a quiz on plsqlchallenge.com I did on using DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING. I had created a table function to test calendar expressions - that might be useful for something similar to what was asked on the mailing list.

So here's a way to generate rows of DATEs using DBMS_SCHEDULER calendaring syntax.

Christmas - A time to give

It's Christmas time... It's a time for giving... It's a time for warm-hearted feelings...

But there are people battling for their lives against cancer, who may not have much energy left to enjoy the holidays. Almost everybody has family or friends whose life has been impacted by cancer. Let us all reach out however we can, help wherever we can, and let good thoughts go out to the victims.

All cancer is terrible - but when the victims are children, it breaks your heart. Young humans suddenly faced with the fact that their lives may be over before they had a chance to really enjoy it.

I have a friend, whose 11 year old daughter was told she has a tumor in the brain right next to the nerve center, where spinal nerves go out to the rest of the body. Impossible place for surgery, survival estimate about 3-5%. Devastating news! It's impossible to understand how that must feel to get such a diagnose.

I'd like to urge everyone to do whatever you can - whether it is just smiles and kind thoughts (that can help too), practical help, or donations to research into cancer cures. There are organizations out there that do wonders in science, as well as wonders in helping families with cancer-struck children.


In the US, you can help Children's Cancer Research Fund at:
http://www.childrenscancer.org/main/ways_to_help/



If you are in Denmark, you can support Børnecancerfonden here:
http://boernecancerfonden.dk/stoet-fonden/

Or wherever you are, find your local organization that does similar work:
https://www.google.com/search?q=support+childrens+cancer+research

Let's make a difference this Christmas. Any help helps. Thank you.

Tuesday, November 11, 2014

DOUG problem-knuser brainstorm eftermiddagsworkshop og middag - Tirsdag 2. december

UPDATE:

Da hveranden tilmeldte indtil nu bedst kan tirsdag 2. december og de andre også kan den dag, så er det hermed vedtaget at det bliver tirsdag vi mødes, nørder om nummerserier, og får en gang mad og drikke.

Nedenstående er derfor rettet til. Tilmeld jer til mig på kbh {snabel-a} thansen.dk så snart I ved om I kan.

Vi ses!

--- --- --- ---

Som et alternativ til kaffemøderne i den danske Oracle brugergruppe DOUG forsøger vi efter idé fra min kollega Majken Sander og undertegnede et nyt koncept uden præsentationer og foredragsholder, men i stedet lade deltagerne brainstorme og sparre med hinanden omkring at knuse et bestemt problem.

Hos thansen.dk køres en aldrende XAL applikation med data i Oracle. Her skal re-nummereres pseudokey for 600 millioner rows pga. applikationen ikke kan håndtere integers over 32 bit. Det betyder massive updates, men der er bare mange begrænsninger der gør at ikke alle måder at gøre det på er velegnede.

Problemstillingen kan være relevant for rigtig mange og der må være mange der har erfaringer med forskellige måder at udføre sådanne updates effektivt. Hvis vi mødes rundt om et whiteboard og brainstormer idéer omkring lige præcis dén problemstilling, så må det kunne udmønte sig i en stak metoder ud fra vore forskellige erfaringer og som både løser det specifikke problem og kan give inspiration til hverdagen til de fleste af os.

Derfor vil thansen.dk gerne sponsere en sådan problem-knuser brainstorm eftermiddag med efterfølgende 2-retters middag på restaurant som tak for hjælpen. Undertegnede Kim Berg Hansen lægger op til problemet og forklarer begrænsningerne, og så er der fri ping-pong til at udveksle idéer og tanker og erfaringer til at finde en effektiv metode til massiv re-nummerering af dataene, som vi så alle kan lære af.

Det vil foregå centralt i København på Restaurant Maven i Nikolaj Kirke der har mødelokale og god mad. Tidspunkt bliver:
Send tilmelding til mig på kbh {snabel-a} thansen.dk med information om:
  • Navn på deltager(e)
  • Deltager / deltager ikke i middagen efter brainstorm (af hensyn til køkkenet)
  • Evt. særlige madbehov (vegetar, allergiker, el.lign.)
Seneste deadline for tilmelding er dagen før af hensyn til køkkenet, men svar endelig så snart I ved om I kan, så vi ved lidt om hvor mange vi bliver ;-)

Skulle der komme flere tilmeldinger end mødelokalets kapacitet (ca. 25 personer) så bliver det først-til-mølle princippet.

Håber I vil tage godt imod denne form for arrangement og synes det kunne være sjovt at ping-ponge med andre udviklere/DBA'er omkring problemløsning - og så selvfølgelig netværke over en god middag ;-)

Spørgsmål? Så kontakt mig på kbh {snabel-a} thansen.dk

Håber vi ses til en god gang hjernegymnastik :-)

Tuesday, September 23, 2014

CSV, XML and JSON parsing - a comparison over versions

Via Steven Feuerstein I was asked to try and give advice concerning fastest way to parse CSV data in PL/SQL. The case was that they had a different database that could be setup to deliver data as a webservice serving either CSV, XML or JSON, and they wished to let their APEX application use PL/SQL to retrieve data from that other database via such webservices. They were not yet on 12.1.0.2.0 so they did not have JSON_TABLE, and they seemed to find that do-it-yourself parsing of CSV data was the fastest. Did we have any idea of a faster way?

Wednesday, September 10, 2014

JSON_TABLE or XMLTABLE - comparison with geocoding

Previously I've demonstrated how to use function XMLTABLE to query Google maps routing directions. Now Oracle version 12.1.0.2.0 has function JSON_TABLE to do similar querying on JSON data rather than XML data. So let's try that out and spot some differences...

Tuesday, August 26, 2014

Unforgettable In-Memory

Inspired by Maria Colgans quest for In-Memory bumper sticker slogans for OOW14, I couldn't resist a little fun. Musical readers should stop reading now :-)


Saturday, June 28, 2014

KScope14 - on my way home

For some reasons I got lounge access here at Seattle airport when going home fra KScope14. So I can use the last couple hours here lounging comfortably writing a few words about an awesome week here.