Viewing 15 posts - 1 through 15 (of 27 total)
I liked this article. It gave an understandable definition of 1NF without having to be familiar with all the terms of domain theory or relation theory or whatever esoterica...
June 30, 2011 at 1:33 pm
declare @var varchar(10)
set @var = 'asdf2'
select case when charindex(' ',@var) > 0 THEN left(@var,charindex(' ',@var)-1) else @var end
Jim
March 25, 2011 at 1:35 pm
From Book On Line
This stored procedure only works with the objects available in Microsoft SQL Server 2000. This feature will be removed in a future version of Microsoft SQL Server....
March 18, 2011 at 10:09 am
DECLARE @DateType char(1)
DECLARE @Date datetime
SET @Date = GETDATE()
SET @DateType = 'H'
SELECT CASE @DateType
WHEN 'Y' THEN DATEADD(yy,datediff(yy,0,@date),0)
...
March 18, 2011 at 9:30 am
What are the data types of these columns? Also, could you be more specific than "it isn't working"?
Jim
February 11, 2011 at 8:50 am
SELECT Convert(datetime,CONVERT(varchar(20),AdmDt)+ ' ' +CONVERT(varchar(5),AdmTm))
SELECT DATEADD(d,datediff(day,convert(datetime,admtm),admdt ,convert(datetime,admtm) )
Jim
February 10, 2011 at 6:41 am
I stole this code so long ago I'm not sure who I stole it from.
DECLARE @t1 table (ISN int,CatalogName varchar (20) )
DECLARE @t2 TABLE(ISN int,ProdISN int,ProdName varchar(20))
INSERT INTO...
February 7, 2011 at 6:26 am
We gave you 2 different ways to get what you wanted. Did you try either of them?
Jim
February 7, 2011 at 6:10 am
Will that still work if there is more than one MRN?
Jim
February 4, 2011 at 1:30 pm
I don't have SQL 2008, but this may help
DECLARE @ADT TABLE (MRN int,ECDNo int,AdmDt date,AdmTm Time,DischDt date)
INSERT INTO @ADT
SELECT 6232201, 100060525,'2010-11-22','12:52','2010-11-24' UNION
SELECT 6232201, 100066361,'2010-12-06','13:03','2010-12-09' UNION
SELECT 6232201, 100068059,'2010-12-09','12:22','2010-12-12'
DECLARE @OBlog...
February 4, 2011 at 12:36 pm
Don't have enough to really go on, but this will get ou started. You can pick off the remaining end tag
declare @xml varchar(100)
set @xml = 'Featured in <a href="/back_to_school">Back...
February 3, 2011 at 1:48 pm
you may need to convert to a bigint or some other larger data type
sum(convert(bigint,rec_cnt))
Jim
December 29, 2010 at 9:02 am
I don't think the trigger is the best way to go here, but anyway, you are not excuting your @Command, you are only setting it to something. You'd...
December 29, 2010 at 6:35 am
Viewing 15 posts - 1 through 15 (of 27 total)