Viewing 15 posts - 6,901 through 6,915 (of 13,469 total)
the code you posted is not creating the table SystemDateTable
i assume what you psoted is just a portion of what you are doing, right?
in what you did paste, you are...
August 23, 2011 at 6:34 am
you should be able to find what the issue is pretty easily;
if you change the object id below to the one you are looking for, what do you get?
on my...
August 23, 2011 at 6:28 am
your variable is too small
DECLARE @sql nvarchar(1000)
but the code you pasted is at least 1065 chars, depending on t table name.
change it to nvarchar(max) to be safe and try again.
August 23, 2011 at 6:19 am
some of your dates are not dates...probably blank strings for death date(a reasonable assumption would be not all patients die or get transferred)
something like this:
...
CASE
WHEN ISDATE(SUBSTRING(BulkColumn, 41, 8)) =1
THEN...
August 23, 2011 at 6:04 am
since you have everything in a staging table, shouldn't you just convert the columns explicitly?
-- Substring input patient
set @sql = N'SELECT
CONVERT(int,SUBSTRING(BulkColumn, 1, 4)) AS patid
,SUBSTRING(BulkColumn, 5, 1) AS...
August 23, 2011 at 5:51 am
I'm guessing the new columns( with defaults or not?) caused a lot of page splits of the data.
I'm thinking rebuilding the indexes on the table would improve the perforamnce...
August 22, 2011 at 2:27 pm
Shurkadze (8/22/2011)
August 22, 2011 at 2:20 pm
GilaMonster (8/22/2011)[hrNo, not always.
...up
Gail I was looking more for a rule of thumb, I'm sure that just like you identified, there are exceptions where the key lookup is better...testing would...
August 22, 2011 at 1:08 pm
Dj463 (8/22/2011)
Lowell (8/22/2011)
Rename the existing SQL123 to, say SQL123CLUSTERI think we cannot rename a SQL instance.
you rename the Server at the operating system/networking level, not the instances themselves.
any...
August 22, 2011 at 1:05 pm
wouldn't you simply do the following.
1. Rename the existing SQL123 to, say SQL123CLUSTER
2. change the ip address on the SQL123CLUSTER to a different IP address.
3. enable clustering, and give...
August 22, 2011 at 9:50 am
Ninja's_RGR'us (8/22/2011)
This will do a table scan anyways. So you might...
August 22, 2011 at 9:27 am
girl_bj0619 (8/22/2011)
i received an error:Invalid object name '##results'.
the examples above (admittedly they are from 2007) suggested using a global temp table. i base dmy example fof of the previous...
August 22, 2011 at 9:25 am
i think you want to use IF EXISTS:
IF EXISTS (select * from ##result)
BEGIN
EXEC msdb.dbo.sp_send_dbmail
@recipients=N'emailaddress',
@body='The IP address with over...
August 22, 2011 at 9:16 am
nope not possible. a column must be identified, and it's new value identified for a valid UPDATE TABLE statement.
...but...you can use the table's metadata to generate the commands for you.
SELECT...
August 22, 2011 at 9:13 am
my advice is you are looking for a problem that does not exist. leave the statistics alone, and update them often.
statistics are used by the system to find the data...
August 22, 2011 at 8:30 am
Viewing 15 posts - 6,901 through 6,915 (of 13,469 total)