Forum Replies Created

Viewing 15 posts - 2,056 through 2,070 (of 6,676 total)

  • Reply To: persisted computed column error

    I would recommend using CONCAT instead of the plus sign...it will simplify the code:

    CONCAT(master_id, company_code, FileLocation_FileBeginsWith, despatch_group
    , convert(char(8), isnull(despatch_group_start_date, '19000101'), 112)
    ...

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Reply To: Difference between where and INNER JOIN comparing a value

    For an INNER join there is no difference - and you can validate that by viewing the execution plan generated from each statement.

     

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Reply To: Intermittent issue with cluster failover when SQL Agent service is restarted

    How are you stopping/starting SQL Server Agent - and why is that something that needs to be done on a regular basis?

    If you are using the services applet to stop/start...

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Reply To: Truncate or Insert data with conditions

    Jonathan AC Roberts wrote:

    You just need BEGIN/END around the statement.

    Also, it will be more efficient to use EXISTS than SELECT COUNT(*).

    IF EXISTS(SELECT * FROM [A]) BEGIN

    ...

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Reply To: [SOLVED]Migrating databases - error on login 4064 (cannot open default database)

    You need to use something like this: ' + convert(varchar(85), Sid, 1) + '

    You don't convert to a varbinary and then concatenate to a string - you need to convert...

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Reply To: is there any better way to export SQL server data into csv file?

    WILLIAM MITCHELL wrote:

    The OP stated "I want to make a report to let user export data from SQL Server database" so why not consider SSRS?

    This also has the benefit of allowing...

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Reply To: [SOLVED]Migrating databases - error on login 4064 (cannot open default database)

    The users in the database were originally created on the source system - and were created with a specific SID.  When you restore that database to a new system -...

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Viewing 15 posts - 2,056 through 2,070 (of 6,676 total)