Forum Replies Created

Viewing 15 posts - 6,901 through 6,915 (of 13,469 total)

  • RE: Error Message - There is already an object named 'SystemDateTable' in the database

    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...

  • RE: object_id(what) .. returns diffrent value depending on user

    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...

  • RE: Bulk Insert with Dates

    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.

  • RE: Bulk Insert with Dates

    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...

  • RE: Bulk Insert with Dates

    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...

  • RE: BCP Slow Export on Updated Large (100 Mill) Table

    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...

  • RE: Incremental load - using timestamp reliable?

    Shurkadze (8/22/2011)


    What if you have a row modified in OLTP with a column value changed that is not mapped to DW. The data then should not be moved to Data...

  • RE: Execution Plans: Key Lookup = Add Index

    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...

  • RE: Upgrade a standalone instance to Cluster

    Dj463 (8/22/2011)


    Lowell (8/22/2011)


    Rename the existing SQL123 to, say SQL123CLUSTER

    I think we cannot rename a SQL instance.

    you rename the Server at the operating system/networking level, not the instances themselves.

    any...

  • RE: Upgrade a standalone instance to Cluster

    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...

  • RE: replace Nulls with blanks across an entire table

    Ninja's_RGR'us (8/22/2011)


    I would ignore the where completely unless I'd know only a small % of the rows would get updated.

    This will do a table scan anyways. So you might...

  • RE: sp_send_dbmail

    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...

  • RE: sp_send_dbmail

    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...

  • RE: replace Nulls with blanks across an entire table

    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...

  • RE: deleting autocreated statistics?

    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...

Viewing 15 posts - 6,901 through 6,915 (of 13,469 total)