Archive for the ‘Uncategorized’ Category

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

Thursday, 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

PHP Model View Controller ( MVC )

Wednesday, 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?