Viewing 15 posts - 256 through 270 (of 1,468 total)
For the above to work, TableName1 and TableName2 would need to have have the same structure.
Since the structure is the same, why not use
SELECT * FROM TableName1
EXCEPT
SELECT...
April 18, 2021 at 3:47 pm
You are hammering the same tables multiple times. You will probably get better perf if you use cross-tab queries to reduce the number of times the tables are read. I...
April 9, 2021 at 6:07 pm
I believe that your join should be
FROM Schedule INNER JOIN
Operations ON Schedule.WorkCenterID = Operations.Operation
April 9, 2021 at 7:26 am
// some operation insert update of my temps table @TempMrc, @TempReport
If you are only doing DML operations on the @Tables, then you should not be using a transaction, as the...
March 26, 2021 at 3:12 pm
First, you want to be using the new join format
FROM @sampledata1 AS A1
CROSS JOIN @test2 ...
March 12, 2021 at 5:46 am
Your issue is that you are using a variable inside the dynamic SQL that is declared outside the dynamic SQL. For this you will need to use sp_executesql
This change...
March 10, 2021 at 7:27 am
Can THIS USER please be nuked. Every 1 of his posts has been spam.
March 8, 2021 at 7:27 am
This should do the trick
/* First get all of the records from Table1, and the Table2 values if they exist */
SELECT T1.PhoneNbr, T1.Interval, T1.CountA,...
March 5, 2021 at 6:50 am
I have no idea about performance differences. Although I cannot imagine that there will be a difference, as they are the same product installed from the same media. In our...
February 25, 2021 at 11:43 am
Firstly, you need to correctly handle the NULL returned by MAX if the table is empty.
Secondly, take a look at this article on concurrency by Gail Shaw.
You will probably...
February 25, 2021 at 10:04 am
If I am not mistaken, the order of the columns in the recommended index is based on the order that they exist in the table.
SELECT ...
February 25, 2021 at 9:58 am
Developer edition is free to download, and has all the bells and whistles of all the versions, so that you can develop the features you require. HOWEVER, you cannot use...
February 25, 2021 at 8:33 am
It's not 100% clear what you are trying to achieve.
Maybe this will get you on the right path
DECLARE @TestData table (StringVal varchar(10));
INSERT INTO @TestData ( StringVal )
VALUES...
February 23, 2021 at 7:45 am
Those values do not represent time.
So, guessing what they are supposed to represent, you have to first convert them to a format that SQL can interpret as time, then do...
February 22, 2021 at 3:18 pm
Your first hurdle to overcome is that the From/to values in the mappings are not in ascending order. Then your Type/Code values in the #trades table are also not in...
February 15, 2021 at 2:59 pm
Viewing 15 posts - 256 through 270 (of 1,468 total)