Viewing 15 posts - 31 through 45 (of 897 total)
You can check the below mentioned articles by Paul White for more information on CROSS-APPLY
http://www.sqlservercentral.com/articles/APPLY/69953/
http://www.sqlservercentral.com/articles/APPLY/69954/
The below mentioned videos from YouTube by...
February 20, 2017 at 11:57 pm
January 27, 2017 at 2:17 am
January 26, 2017 at 10:38 pm
Customer RowNum SalesOrder Customer
(100915) (2) (100915-2) (ARORA)
(100915) (1) (100915-1) (ARORA)
(100576) (1) (100576-1...
January 23, 2017 at 11:14 pm
We would certainly need more detail like
1. DDL of the tables involved
2. Some sample data
3. Expected results based on the sample data to test the solutions
January 20, 2017 at 4:56 am
With no DDL and sample data to test, this is what I could come up with.
SELECT O.OrderID, O.CustomerID, O.CustomerVisitID, O.ItemID, O.ItemDesc, O.TransactionDate,
F.OrderID AS NOrderId, F.CustomerID AS...
January 17, 2017 at 3:05 am
The link given below should give you some idea as well.
http://sqlhints.com/2015/07/10/how-to-get-difference-between-two-dates-in-years-months-and-days-in-sql-server/
January 16, 2017 at 3:32 am
John Corkett - Monday, January 16, 2017 12:28 AMWould this work?
WHERE YEAR(Invoice_Date) = YEAR(GETDATE()) - 1 AND MONTH(Invoice_Date) = MONTH(GETDATE())
Yes. It should, but...
January 16, 2017 at 2:23 am
You will need a FULL OUTER JOIN
DECLARE @Table1 TABLE (ID INT, Label VARCHAR(10), Value INT)
DECLARE @Table2 TABLE (ID INT, Label VARCHAR(10), Value INT)
INSERT @Table1
SELECT ...
November 25, 2016 at 12:27 am
You can also use the LEAD or LAG functions to access the next and previous row values respectively
November 25, 2016 at 12:10 am
You can do this without using REPLACE as well
UPDATE d
set d.[Description] = c.zipcode + ' - ' + d.Description
FROM [DocumentManagement].[dbo].[LesDescription] as d
inner join [DocumentManagement].[dbo].[LesCities] as c
on d.account = c.city
September 20, 2016 at 1:29 am
This should be of help..
DECLARE @FirstTable TABLE
(
ChildNode INT,
ParentNode INT
)
DECLARE @SecondTable TABLE
(
Node INT,
BSid VARCHAR(20)
)
INSERT @FirstTable( ChildNode, ParentNode )
SELECT...
September 20, 2016 at 12:21 am
les.61 (9/19/2016)
If I run the SET command I get an "incorrect Syntax near '=' " message.
I ran
Select (City + ' - ' + [Zip-Code] + '...
September 19, 2016 at 11:51 pm
Viewing 15 posts - 31 through 45 (of 897 total)