Viewing 15 posts - 166 through 180 (of 1,957 total)
Luis Cazares (9/23/2015)
You can also define the columns as the Primary Key.
ALTER TABLE OrderDetails
ADD CONSTRAINT PK_OrderDetails PRIMARY KEY (InvoiceID, LineitemNumber);
Yes, I read the question as multiple rows per InvoiceID,...
September 23, 2015 at 1:33 pm
I would use a unique index on InvoiceID filtered where LineitemNumber is not null;
This way you can have as many Null LineitemNumber rows as you like for each InvoiceID, but...
September 23, 2015 at 1:10 pm
I can't see anything wrong with that expression, so maybe the problem is elsewhere.
Are you trying to insert that data into another uniqueidentifier column?
September 22, 2015 at 5:28 pm
The referencing works just fine on 2016, so maybe it was a bug in that version?
September 22, 2015 at 5:14 pm
Absolutely the right way to go, I just wanted to clarify the problem with the code presented as getting the right data type in a recursive CTE is one of...
September 21, 2015 at 9:04 am
You need DECIMAL(4,2), and to ensure the recursive part of the query conforms to that data type...
You can't put 1.00 into DECIMAL(2,2), when you try, this errors:
SELECT @Start=1.00, @End=20.00
DECLARE @Start...
September 21, 2015 at 3:41 am
You can also improve on that a bit Alan, it won't scale at all well (try it for a sample of 700 rows)
I would always try and keep a WHILE...
September 15, 2015 at 5:52 pm
Hi Robert,
I hadn't noticed that about the delay! I'll check next time whether there are multiple tabs open and check in another browser as well.
For me, yes, the problem only...
September 14, 2015 at 6:00 am
robinwilson (9/12/2015)
I recently moved to a new organisation and one of my first tasks was to work out why the main software the organisation uses is, and has always been,...
September 12, 2015 at 5:09 pm
And another ... over a minute to open a thread at about 01:26 (London) 12 sep 2015
September 11, 2015 at 6:43 pm
Anyone hear squeaking at around 1:16am (London time)?
I had a long delay when I clicked Reply on a thread, it felt like upwards of 30 seconds or so before...
September 11, 2015 at 6:29 pm
If this is a one time copy of only ~100 rows, then why go to all the bother of scripting/exporting and importing?
Right click your source table in SSMS, and choose...
September 11, 2015 at 6:24 pm
stephen.long.1 (9/11/2015)
I agree with a lot of people here, the correct answer should be 3, based upon structure, not decorations:SELECT x AS y
SELECT x y
SELECT y = x
I agree with...
September 11, 2015 at 8:04 am
Yes, make the documents available on a web page/service or SharePoint.
September 10, 2015 at 12:08 pm
Viewing 15 posts - 166 through 180 (of 1,957 total)