Ginger Steamed Mahi-Mahi

26 11 2014

Experimented and had this for lunch today and turned out to be quite yummy.

Ginger Steamed Mahi-Mahi with roasted potatoes and veggies.

Read the rest of this entry »





Star Trek Las Vegas 2014

8 08 2014

Had a mini vacation in Las Vegas and attended Creation Entertainment’s 2014 Star Trek convention, held at The Rio Suites Hotel this past July 31-August 3, 2014.

Thursday started early, getting up at 4 AM to do some last minute checks before heading out on the road. Arriving around 9 AM, the first order of business is to get to The Rio and register. I had originally planned to arrive Thursday night; however, the 2 Next Generation photo ops pre-purchased ended up being scheduled during the day on Thursday; lucky that I checked the schedule of events a couple of days before.

Did a quick walk around the dealer room and spotted Brent Spiner setting up at his autograph table. Speaking of Brent, my first photo op was with Brent Spiner, Levar Burton and Michael Dorn. If you can’t tell, I was totally geeking out.

Levar Burton, Me, Brent Spiner and Michael Dorn

With my next photo op scheduled around 3 PM, I took advantage of the down time and grabbed a bite at the Hash House A-Go-Go inside the Rio. Ended up sitting at the bar; and, unbeknownst to me at the time, right next to Catherine Hicks! Had a bit of a chat/laugh with this lovely lady about how excessive things were, starting with the amount of food we were given. It wasn’t until she was about to leave that it started to dawn on me who she was and stammered something like “You’re in the Star Trek movie with the whales!” (yeah smooth).

Next photo op was with Marina Sirtis and Gates McFadden, where both ladies ended up playing with my hair. Standing in between them for the photo, I told the photographer to give me a second to remove my pony tail; to which Marina and Gates helped me get ready by fluffing my hair for the picture.

Marina Sirtis, Me, Gates McFadden

Had a few more photo ops Saturday and Sunday

Simon Pegg
Simon Pegg

Terri Farrell as Jadzia Dax
Terri Farrell with her Jadzia Dax make up and Klingon wedding gown. Make up by Michael Westmore.

William Shatner
The one and only William Shatner


Also managed to meet other nerds & celebs out and about

Lee Arenberg Lee Arenberg aka Grumpy on Once Upon a Time
Garret Wang Garret Wang
Nikki Griffin Nikki Griffin
Chloe Dykstra Chloe Dykstra
Boback Ferdowsi Boback Ferdowsi – in line for Terri Farrell’s photo op




Altering SQL Table-Valued Data Types

22 07 2014

Table-valued data types and parameters were introduced in SQL Server 2008. Recently, I’ve had to modify the structure of an existing table-valued data type. After doing a bit of research, there’s unfortunately no way to alter them. Basically the only option is to drop and re-create the table type. Bit of a PITA but that’s not the worst part. Below is an excerpt from MSDN. Note the 3rd bullet point:

The DROP TYPE statement will not execute when any of the following is true:

  • There are tables in the database that contain columns of the alias data type or the user-defined type. Information about alias or user-defined type columns can be obtained by querying the sys.columns or sys.column_type_usages catalog views.
  • There are computed columns, CHECK constraints, schema-bound views, and schema-bound functions whose definitions reference the alias or user-defined type. Information about these references can be obtained by querying the sys.sql_expression_dependencies catalog view.
  • There are functions, stored procedures, or triggers created in the database, and these routines use variables and parameters of the alias or user-defined type. Information about alias or user-defined type parameters can be obtained by querying the sys.parameters or sys.parameter_type_usages catalog views.

Source

Yes, you’ll have to first remove references before it can be dropped. The b***h is dealing with schema bound objects; you’ll have to temporarily remove the schema binding on dependent objects cascading to other objects dependent on them and so on and so forth.

Furthermore, and I’m not sure if this is a bug or not, but you can’t set permissions on a table-valued data type in the same TRANSACTION. Splitting the transaction in batches throws an error (doesn’t recognize the data type). I’ve had to apply the security changes AFTER the transaction has been committed.





46th Birthday

7 07 2014

Almost on a whim, I decided to spend my birthday weekend in Las Vegas, Nevada.

Arrived Friday, June 27, and the first stop was a local dive bar, Davy’s Locker, and had my first Chicken Cock; followed by dinner @ Sushi Mon and capped with a massage.

Chicken Cock

The following day was spent lounging around the Beach @ Mandalay Bay Resort & Hotel, dinner at Charlie Palmer’s at the Four Season and topped off by a comedy show held at Foundation Room.

Sunday was the highlight of the trip where I got to experience a tandem skydive @ Vegas Extreme Skydiving. I think I’m hooked and already planning to do another jump at the end of July when I go back to Las Vegas for a Star Trek convention.

Read the rest of this entry »





T-SQL :: Truncating Second Portion from Date/Time Objects

22 10 2013

Sometimes you need to get rid of a portion of a date and/or time object. Typically, I use something like:

/* Get the 1st of the current month */
DECLARE @date DATETIME2 = GETDATE();

SELECT DATEADD(DAY, 
          DATEPART(DAY, @date) * -1 + 1, @date)

In general, the above works fine. I’ve recently had to change this approach when it comes to dealing with seconds, especially with date/time objects that have fraction of a second.

DECLARE @time TIME = '12:45:05.6870000'

SELECT CAST(DATEADD(SECOND, 
            DATEPART(SECOND, @time) * -1, @time) AS TIME(0))

In the case above, we get the result 12:45:01; with the extra second as a result of the cast to TIME(0). In this case, I find it more consisted to do nested casts instead.

DECLARE @time TIME = '12:45:05.6870000'

SELECT CAST (CAST (CAST (@time AS TIME(0)) 
 /* End up getting HH:MM portions of the time */
            AS VARCHAR(5)) 
            AS TIME(0))

Giving us the desired result of 12:45:00.