Viewing 15 posts - 2,056 through 2,070 (of 6,676 total)
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
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
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
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
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
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
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)