Viewing 15 posts - 5,116 through 5,130 (of 14,953 total)
This kind of weird requirement is usually schoolwork. Is it this time?
February 5, 2011 at 3:15 pm
Well, since the first statement deletes from a, and the second and third depend on the data still being in a for their joins to work, I'd be surprised if...
February 5, 2011 at 3:14 pm
Delete only works on one table at a time (Select is really the only one that can work with multiple target tables).
What you'll need to do is delete from "a",...
February 4, 2011 at 2:10 pm
Almost certainly not. Try some tests on your hardware, see if it has any impact at all. I doubt it will.
February 4, 2011 at 1:38 pm
skt5000 (2/4/2011)
Will that still work if there is more than one MRN?Jim
It'll depend on the exact need of the query.
If you need one per MRN, I'd probably do it through...
February 4, 2011 at 1:37 pm
Tom.Thomson (2/4/2011)
GSquared (2/4/2011)
February 4, 2011 at 1:32 pm
I guess it follows the "explicit is better than implicit" rule of thumb, but otherwise, there's no benefit I can think of to it.
February 4, 2011 at 1:26 pm
Alternately:
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 TABLE(MRN int, DelDate date,DelTime time)
INSERT @OBlog
SELECT 6232201,...
February 4, 2011 at 1:20 pm
I'd turn this:
where firstname LIKE '[!-/:-ÿ]%'
into:
where firstname LIKE '[^0-9]%'
The carat (up-arrow) means "excluding" in there. It's more clear that the exact thing you want to do is exclude 0-9,...
February 4, 2011 at 1:06 pm
This should give you what you need more efficiently that the current code:
where firstname NOT LIKE '["#.%$[-]_()*0-9]%'
The square-brackets give the Like operator a range of characters to operate on.
What you...
February 4, 2011 at 12:53 pm
Honestly, there are two ways to deal with this.
First, is review all database code yourself and make sure it's properly tuned, before it goes into production.
Second, is monitor the database...
February 4, 2011 at 11:55 am
First, select all clock-ins, with their corresponding clock-outs.
I usually would do that something like this:
select PersonID, MyDateTimeColumn as ClockIn,
(select min(MyDateTimeColumn)
from dbo.MyTable as MT2
where MT2.PersonID...
February 4, 2011 at 11:52 am
Is it possible that they are disabled?
Usually, dropping and re-creating (with check) is the best way to get them trusted.
February 4, 2011 at 11:47 am
With the way that varchar data is stored, there really isn't any significant different between those two, in terms of storage, performance, et al.
There is a difference between char and...
February 4, 2011 at 10:45 am
Brandie Tarvin (2/4/2011)
GSquared (2/4/2011)
February 4, 2011 at 8:47 am
Viewing 15 posts - 5,116 through 5,130 (of 14,953 total)