Viewing 15 posts - 1,321 through 1,335 (of 1,468 total)
I cannot imagine any method that will not be a massive hit on your server.
Perhaps if you explained why you need to create such a massive amount data, some of...
November 28, 2016 at 5:14 am
This piece of code will not work for @NumberOfRows > 31.
urbanromio2 (11/27/2016)
Declare @NumberOfRows int;
Declare @Numbers Table(Number int);
;With cte As
(Select 1 As Number
Union All
Select Number + 1
From cte
Where Number < Power(2,...
November 28, 2016 at 2:31 am
You want to look into the PIVOT relational operator
November 27, 2016 at 10:50 pm
With a few nested queries, you could also sue the following code to generate the JSON
SELECT '['
+ STUFF((
...
November 25, 2016 at 2:05 pm
DesNorton (11/24/2016)
November 25, 2016 at 12:26 pm
vijay.singh 46672 (11/24/2016)
Hi,How to convert table/tables data to (Embedded/Nested) JSON format in SQL Server 2014? Task is to import data into mongodb which requires data in JSON format.
Thanks in advance.
Regards,
Vijay
SQL...
November 24, 2016 at 12:24 pm
bineet.dungdung (11/23/2016)
November 24, 2016 at 10:37 am
Michael L John (11/23/2016)
Take a look at this link.
Thank you Michael, but this did not solve my issue. In my case the installation runs through to the end, but...
November 23, 2016 at 1:47 pm
The date filters between these 2 queries are not the same.
... STARTTIME > '2016-12-06T16:00:00' AND a.EndTime < '2016-12-11T10:00:00'
... starttime > '2016/12/10' and endtime < '2016/12/18'
November 20, 2016 at 9:48 am
You need to join the table back to itself to get the previous record, and then do the math
SELECT cur.*
, ISNULL(DATEDIFF(MINUTE, prev.TimeOutRoom, cur.TimeInRoom), 0) AS TurnaroundMinutes
FROM #Test...
November 19, 2016 at 3:06 am
Deny Christian (11/18/2016)
So, it will take only 1 data if there are 3 data at the Source ?
The MERGE statement will take all of the data that you provide it.
However,...
November 18, 2016 at 1:28 am
OK. So it seems that your TEMP_SUPPLIER has duplicate values for SUPPLIER_CODE.
To prove this, let's create a simple data set that will cause the PK error
CREATE TABLE #M_SUPPLIER (
...
November 18, 2016 at 1:06 am
Please supply table structures for M_SUPPLIER and TEMP_SUPPLIER, as well as sample data that will consistantly cause the error that you are getting.
November 17, 2016 at 11:33 pm
MERGE M_SUPPLIER A --- TARGET
USING TEMP_SUPPLIER B --- SOURCE DUMMY
ON A.SUPPLIER_CODE = B.SUPPLIER_CODE
-- You are matching on A.SUPPLIER_CODE = B.SUPPLIER_CODE
-- Then you say WHEN A.SUPPLIER_CODE <> B.SUPPLIER_CODE
WHEN MATCHED --AND A.SUPPLIER_CODE...
November 17, 2016 at 10:37 pm
Dynamic cross-tab queries are dealt with expertly and in great detail in these two Jeff Moden articles:
November 17, 2016 at 10:32 pm
Viewing 15 posts - 1,321 through 1,335 (of 1,468 total)