‘Syntax error converting datetime from character string’ with M SQL Stored Procedure

August 21st, 2008

Are you getting this error message:
‘Syntax error converting datetime from character string’

Solution:

Make sure you cast the datetime variables as nvarchar if you are using the exec command!

Example Code:

CREATE PROCEDURE CRM_ComplaintStageCompsMembersClosedMultiple
@sQStartDate datetime,
@sQEndDate datetime

AS
Begin

set @strsql = ” INSERT #TEMPDISTINCT(id, posted_timestamp, dateresponded, sent_timestamp, serviceunit, service, dept)”+
“  SELECT * FROM `table` Where r.posted_timestamp >=  ‘” + cast(@sQStartDate as nvarchar(50)) + “‘ AND r.posted_timestamp <  ‘” + cast(@sQEndDate as nvarchar(50)) + “‘”

exec sp_executesql @strsql

END

GO

I Just Got A CBR600-F!

July 27th, 2008

After a couple of years without a motorbike i finally managed to gather the funds to get myself a bike once again! Still liking confidence as its my first sports bike (had two Bandit 600’s before) but enjoying it all the same. Think ill give it a spin tommorrow as ive taken a day off work :)

Yer Baby!

 

 

Tony Wilson Experience Inspired me…

June 22nd, 2008

Was lucky enough to be invited to the Tony Wilson Experience yesterday (21st June 2008) with a press invite. Have a fantastic day and got plenty of photos (keep your eye out in Klash mag,BillBoard UK, Bench and Hacienda archives). Met some very influential people and was inspired by our conversations. Met Irvine Welsh (writer of trainspotting) who was very pleasant and i felt very privileged to get the opportunity to speak to him about his current work.

I will put some photos on here very soon and finish off this article in more detail!!

 

 

PHP Model View Controller ( MVC )

June 18th, 2008

Im working on an MVC framework for work but there are so many different ways of doing everything its hard to make decisions! Should i write my own framework? should i use an existing one like Zend 2.5?

I will be doing some tutorials on here soon for my development work..

Must be lunch time is it?

Wow I finally got a blog!

June 17th, 2008

It only took me 23years but i’ve got myself a blog at last!

Expect to see me writing about my experiences and mainly Web Development posts, Motorbike adventures and my current gig’s and musical oppinions…

Catch you soon..

Andi G