Viewing 15 posts - 1 through 15 (of 17 total)
Hi,
The function in the table definition is a calculated column (you can google it 🙂
the function returns 1 if the P_DATE for the Propnum is minimum .. the first inserted...
November 9, 2015 at 5:17 pm
Hi,
Maybe you can try with a computed column
REF: https://msdn.microsoft.com/en-AU/library/ms188300.aspx
CREATE FUNCTION dbo.getFirstP_DatePropnum(@date date, @Propnum INT)
RETURNS BIT
AS
BEGIN
RETURN
CASE
...
November 9, 2015 at 4:24 pm
Hi Stephanie,
The scope of the transaction isolation levels is Session.
This means that all transactions within the session (explicit, implicit or auto-commit) will follow, in this example the optimistic locking methodology...
October 25, 2015 at 5:05 pm
Hi naidzionik,
It might have something to do with the linked server provider (not sure) and how SUM handles NULLs (should just ignore it)
eg. this worked for me:
SELECT
[Dim1]
,[Dim2]
,[Dim3]
,SUM(ISNULL([Metric],0)) Sum_Metric
,GROUPING(Dim1) Grouping_Dim1
,GROUPING(Dim2) Grouping_Dim2
,GROUPING(Dim3)...
October 18, 2015 at 6:34 pm
christophe.bernard 47659 (10/14/2015)
thanks for your time that's exactly what i want ..and now that's work ..
I don't know why the property of this object is...
October 14, 2015 at 4:33 pm
Hi Christophe,
The problem with the query you provided is related with the datetime datatype.
The datetime can store dates from January 1, 1753 ...
In the example the query tries to cast...
October 13, 2015 at 4:19 pm
Hi Sean,
I didn't have enough time to go through the query and to understand the query logic to be able to "assume" what's that all about. The two things caught...
October 8, 2015 at 4:31 pm
Hi cthorn112,
I think that's ok to set the isolation level to READ UNCOMMITTED if you know what to expect.. dirty reads and all other side effects (personally I've never been...
October 7, 2015 at 5:08 pm
Hi
One of the possible solutions could be
--create some test data
USE tempdb
GO
CREATE TABLE test1 (sessionId int, MRN int, ChartStartTime date ,DeliveryTime date)
GO
INSERT INTO dbo.test1(sessionId,MRN,ChartStartTime,DeliveryTime)
SELECT...
October 4, 2015 at 8:21 pm
Hi,
you can use grouping to find sum of Prices over the required set of columns (all except OI.Price)
..maybe something like...
SELECT --without DISTINCT ...
...
DATENAME(ww,o.OrderDate) as 'Week',
o.Pieces,
SUM(OI.Price) AS '$',
ct.CustType,
'Everything Else' as 'Code...
September 30, 2015 at 5:34 pm
You can format the output like
....sqlcmd ...
1> SELECT FORMAT(Column_Name,'0') FROM table
2> GO
...
1
1
1
September 29, 2015 at 10:44 pm
Hi shamshad.ali
I think there's noting wrong with the isolation level. (READ_COMMITTED I believe).
If I understand, you described two situations:
Situation 1
1. You started an explicit transaction in SESSION1 with the multiple...
September 28, 2015 at 8:36 pm
Hi,
If I got it right, the requirement is to pick a node from hierarchy and go in both directions, reverse to the root and down to the leaf level.
I set...
September 23, 2015 at 12:02 am
Hi,
I thought that the query was generated by a report tool or something.
..DISTINCT and Grouping,,... predicate 1 =1 and so on.
The logic of the query is not clear. Do you...
September 22, 2015 at 7:20 pm
Viewing 15 posts - 1 through 15 (of 17 total)