Viewing 14 posts - 1 through 14 (of 14 total)
Thanks,
It's as simple as that then.
I've used the select ... union all method too
November 8, 2012 at 8:47 am
I did have to change the code to
declare @sql nchar(1000)
select @sql = 'select * from sdfad'
but creating and running dynamic SQL is a good...
October 20, 2011 at 10:07 am
The first example worked fine, Sean. it will be inconvient to create another stored procedure to handle the error, but that's the best you can get.
BTW, I'm passing a database...
October 20, 2011 at 9:18 am
Well, reading is under rated as a skill. I had missed that sentence (and the solution below). Many thanks, it all makes sense to me now. Catch blocks can't catch...
October 20, 2011 at 9:07 am
Thank you Jack.
I have got the up_Error procedure working, but have decided that logging errors to a table fits what I actual want to happen.
To get up_Error working I created...
October 5, 2011 at 4:12 am
While the solution worked (using a table of dates) it was very slow when used on large tables so has been scrapped.
I have found a method that does what I...
September 29, 2011 at 8:49 am
Argh, trick question. You answer what you thing the question is not what it really is!
September 29, 2011 at 4:44 am
Thank you for your thoughts. It seems that there isn't an easy way to validate a date within a function (if ISDATE doesn't work for you). The CLR solution is...
September 27, 2011 at 8:58 am
select *
from tbl
where ISNULL(fromDate,GETDATE())<= GETDATE()
and ISNULL(toDate,GETDATE())>= GETDATE()
would work?
September 22, 2011 at 6:11 am
I accept that the function boils down to a CONVERT, but the problem is really about validating the string passed before calling CONVERT.
Eg
DECLARE @val CHAR(19)
SET
September 22, 2011 at 2:48 am
By coincidence I am getting the same error on 2005. The server share I was getting a text file from has been migrated to a new server and now it's...
July 25, 2011 at 9:18 am
I was looking at this and although I've decided on the OPENROWSET method, I have got the table structure returned by sp_help_job if that helps anyone.
CREATE TABLE #JobInfo(
[job_id] [uniqueidentifier] NULL,
[originating_server]...
June 1, 2011 at 8:17 am
What does SARG mean?
I'll go and look it up now, but I like to think of these articles as stand alone so would like an explanation the article itself.
Whether the...
February 11, 2010 at 2:42 am
Viewing 14 posts - 1 through 14 (of 14 total)