Viewing 15 posts - 31 through 45 (of 475 total)
Unfortunately there is no built in way to convert from a linestring to a polygon, which is a bit of an oversite in my opinion.
One way to do this is
--...
September 15, 2014 at 12:56 pm
Hi
Not sure why you are getting the trailing 0's, unless there is something else causing it to recast after that.
Taking your statements and replacing the values why some hard coded...
September 7, 2014 at 8:34 pm
The -2 on the row number was to get it to ignore the first row of data in the grouping. So the first group of 10 would be rows...
September 3, 2014 at 8:38 pm
You were doing a rolling average on 10 minutes and an hour.
Not sure what you want as a result though. Are you able to expand on your requirement?
If you...
September 3, 2014 at 7:07 pm
There are likely to be many ways to do this.
Here's a quick way to mask the column.
CREATE VIEW Masked AS
SELECT REPLICATE('*',LEN(FirstName)) FirstName,
REPLICATE('*',LEN(LastName)) LastName,
...
September 3, 2014 at 1:09 pm
Your assignment is casting your integer to a varchar. If the result doesn't fit the variable then it will be truncated or rounded.
If you have a look...
August 27, 2014 at 3:20 pm
Hi
Here's another variation that should work. It uses a couple of stuffs rather than a substring
SELECT TOP 5000 TextData,
STUFF( --Replace beginning with empty string
...
August 26, 2014 at 8:42 pm
That's interesting
From this drop table #salesline;
drop table #ItemLedgerEntry;
--create the temp table
Create table #SalesLine
(
Novarchar (50) not null
, LocationCodevarchar (50) not null
, QtyCommitint not null
)
create table #ItemLedgerEntry
(
Novarchar (50) not null
, LocationCodevarchar (50)...
August 25, 2014 at 7:43 pm
Hi
I think Eirikur's is right, except the summing CTEs were missed. Try Eirikur's with the CTEs in place.
WITH SumSalesQtyCommit AS
(
SELECT [No]
, [LocationCode]
, Sum([QtyCommit]) AS SumQtyCommitTotal
FROM #SalesLine
GROUP BY [No],...
August 25, 2014 at 4:56 pm
Can you post up your solution when you have it tuned thanks.
August 25, 2014 at 2:35 pm
What would you expect for the following data?
INSERT INTO PRE_LOAD
(KitID, BatteryID, TestID, LBSTAT)
SELECT 'C1473045850','T1878','3730','NOT DONE' UNION ALL
SELECT 'C1473045850','T1878','3731','NOT DONE' UNION ALL
SELECT 'C1473045850','T1878','3732','NOT DONE' UNION ALL
SELECT 'C1473045850','T1878','3733','NOT...
August 25, 2014 at 1:35 pm
Hi
My understanding of the requirements is slightly different, so this may be way wrong:w00t:
SELECT p.KitID,
p.BatteryID,
p.TestID,
p.LBSTAT
FROM PRE_LOAD p
CROSS APPLY (
SELECT COUNT(*) chk
FROM PRE_LOAD c
WHERE p.KitID = c.KitID AND
p.TestID =...
August 25, 2014 at 1:17 pm
It looks as if it is
Googling on information_schema character_sets injection throws up a number of pages that indicate that.
Here's one from the around the top of my search SQL Injection...
August 21, 2014 at 7:50 pm
No problem, glad to help
August 21, 2014 at 1:58 pm
Hi
You could try
WITH RecommendationRank AS (
SELECT ItemCode As OriginalItem,
AlternateItem,
Row_Number() over (Partition by ItemCode Order by Date desc) as RecNumber
From AlternateRecommendations
)
SELECT
o.ItemCode
,MAX(CASE WHEN r.RecNumber = 1 THEN r.AlternateItem ELSE NULL END)...
August 20, 2014 at 5:37 pm
Viewing 15 posts - 31 through 45 (of 475 total)