ISO 8601 Aviation week number in MSSQL

May 14th, 2009

Week numbers are differ from culture to culture but if you need exact solution of your reports or calculation you have to need individual function for this calculation method. We need ISO 8601 date calculation for this situation because of aviation industry are using this stantard.
You can find a good article about ISO 8601 on wikipedia http://en.wikipedia.org/wiki/ISO_8601
A simple solution coming from Books Online
Read more…

mbudak Aviation, SQL ,

Distance between two different airports

May 13th, 2009

I have large airport database following schema. I am using this airport database for many reports as like seat by kilometers or fuel by kms.

CREATE TABLE [dbo].[AirDromes](
[ID] [int] NOT NULL,
[IATA] [nvarchar](3) NULL
[Name] [nvarchar](255) NULL,
[IDCountry] [int] NULL,
[LAT] [decimal](10, 6) NULL,
[LON] [decimal](10, 6) NULL,

LAT and LOT columns point coordination of that airports. So we can calculate kilometers between two coordinates as following function;
Read more…

mbudak Aviation, SQL , ,

Heybeliada trip

March 30th, 2009

Heybeliada, one of the famous island in the Marmara sea near of Istanbul. My wife and I started our journey from Kadikoy dock in Istanbul. 

Seagulls Seagulls A View from Kadikoy dock 

My wife feeding a seagull 
Feeding a Seagull

 

mbudak Photography ,

How do I get random record in MSSQL?

February 23rd, 2009

simple question has simple answer.

Select top 1 * From [YourTable] Order by newid()

How it is working?

newid() generates e guid following as like that “CC5F5296-9D7A-401A-8E54-FDC399CE739D” . Thats why we can use Order by newid() function with our queries. When we run this query, every time we get different guid, therefore we can get random orders and we just select top 1 row in every query.

mbudak SQL ,

Airport taxiway signs

February 23rd, 2009

I think most boring part of our flights is when the aircraft is taxiing from the apron to the runway or the other direction after landing.

for a little bit fun for our flights I just try to explain some airport signs here. You can show off with it to the passenger seated next to you.

The flashcards are taken from PDF file I took on AOPA’s web site. 

 
Read more…

mbudak Aviation, Travel , ,

Hello there!

February 18th, 2009

Welcome to my personal BLOG

Hi everyone, I just started to blogging with Wordpress. First off all my purpose will to improve my English skill thats why my choice is this language. So I will blog about my programming skills, SQL and little bit electronic little bit photography.

Happy share

mbudak Uncategorized