Viewing 15 posts - 8,731 through 8,745 (of 26,490 total)
Does this help?
DECLARE @TestTable TABLE (
TestTableID int IDENTITY(1,1),
TestValue varchar(30)
);
INSERT INTO @TestTable(TestValue)
VALUES ('fresh chives'),('MIRACLE WHIP');
SELECT * FROM @TestTable;
SELECT * FROM @TestTable WHERE TestValue...
February 25, 2013 at 11:44 am
I can do everything your code is doing without using DATEFROMPRARTS:
declare @Date_received date = '2013-02-23';
select
@Date_received,
dateadd(dd, -1, dateadd(wk, datediff(wk, cast('1900-01-01' as date), @Date_received),...
February 23, 2013 at 8:54 pm
Champagne Charly (2/23/2013)
Has any idea why this is classed as non deterministic.
DATEFROMPARTS(DatePart(yyyy,DATEADD(dd, (DATEPART(dw, Date_received) - 1) * - 1, Date_received)),DatePart(mm,DATEADD(dd, (DATEPART(dw, Date_received) - 1) * - 1, Date_received)),DatePart(dd,DATEADD(dd, (DATEPART(dw,...
February 23, 2013 at 7:52 pm
Paul White (2/23/2013)
Lynn Pettis (2/23/2013)
I did qualify that it was in my experience. Could be they are being converted to strings before being sorted.
That's fine, I'm not posting to...
February 23, 2013 at 7:39 pm
Unless you have configured your named instances to use specific ports, the port numbers assigned will (can, may) change each time the named instance is restarted. The SQL Browser...
February 23, 2013 at 7:34 pm
I don't know about any of you but this is just down right scary.
Now please, no piling on here.
February 23, 2013 at 7:25 pm
Paul White (2/23/2013)
Lynn Pettis (2/22/2013)
February 23, 2013 at 7:18 pm
I'm not even sure what you are trying to accomplish. Plus, what is the other function doing? There really isn't enough information to really provide much help.
You may...
February 22, 2013 at 10:36 pm
Jeff Moden (2/22/2013)
Lynn Pettis (2/22/2013)
I haven't tried, but are you sure you can convert a uniqueidentifier to a bigint?Yes, but not directly.
SELECT CAST(CAST(NEWID() AS BINARY(16)) AS BIGINT)
Cool. Learned something...
February 22, 2013 at 10:25 pm
I haven't tried, but are you sure you can convert a uniqueidentifier to a bigint?
As to ordering by a uniqueidentifier, it sorts in ascending or descending order as if it...
February 22, 2013 at 9:08 pm
I let SSMS generate the script to run a stored proc, and I get this:
DECLARE @rc int
DECLARE @DDVersion varchar(20)
-- TODO: Set parameter values here.
EXECUTE @rc = [cidne2110].[dbo].[spDDAddFixAll]
...
February 22, 2013 at 3:36 pm
Please post the DDL for the table(s) including index definitions. Also, please post the actual execution plan for both of the queries. These can be saved as .sqlplan...
February 22, 2013 at 3:29 pm
crazyEmu (2/21/2013)
Was confronted by a trigger just yesterday, wonderful use of nested cursors. Just had to post it as an example.
Would not be surprised if this was a port from...
February 22, 2013 at 7:01 am
cmrhema (2/22/2013)
15/02/2013 04:25:5721/02/2013 02:25:57
these are non working
These are invalid dates for US English settings.
February 22, 2013 at 6:50 am
Can you show us some of the data that is failing?
February 21, 2013 at 8:59 pm
Viewing 15 posts - 8,731 through 8,745 (of 26,490 total)