Viewing 15 posts - 286 through 300 (of 475 total)
Hi
To me it looks like you want to do a & (bitwise AND) on the binaries. Unfortunately for the length of the binaries that you are indicating this will...
September 3, 2013 at 1:23 pm
I may be misunderstanding you requirement, but you could simply change your outer select to do a union all (or union depending on your data)
select
r.DIVName1 as [Division]
,r.CCYCODE as [Code]
,r.title...
September 2, 2013 at 1:09 pm
I thought I would have a go at this with a simplified example. I don't seem to get the behaviour that you are getting? What version of SQL...
August 25, 2013 at 6:04 pm
I personally loathe the one where something like
7/21
gets converted to
Jul-21
August 22, 2013 at 5:59 pm
Hi
Simplifying you query down, I would expect that you are seeing the following behaviour?
with simpleExample AS (
-- A simplified example of what I expect you are seeing from inside...
August 22, 2013 at 5:49 pm
Hi
You could also try (assuming this is a numeric/float column)
with sampledata as (
select v
from (VALUES (1.1), (1.2), (2.1), (2.2), (10.1), (10.2), (10.3)) v (v)
)
select v
from sampledata
where cast(v as int)...
August 22, 2013 at 1:30 pm
Hi
These will probably perform like a dog on larger sets, but here is 2 more options
SELECT set_id, product, attribute
FROM #temp t
INNER JOIN
(
SELECT DISTINCT MIN(set_id) minid
FROM #temp
GROUP BY product,...
August 20, 2013 at 2:02 pm
Thanks for a good article Hilda.
I have been hit by different server versions ourselves causing odd behaviour introduced by a service pack. STUnion started returning lines when...
August 20, 2013 at 1:38 pm
I think this gives the results that you want. Then it's just a matter of wrapping it up in a delete
select row_number() OVER (order by a.name, a.ord) Row,
a.Ord,
CASE When...
August 15, 2013 at 8:25 pm
Sorry for the delay getting back.
There would be no problem using a Geography in a temporary table
CREATE TABLE #TempLocation
(Code Varchar(5) PRIMARY KEY
,Location Geography
)
INSERT INTO #TempLocation
VALUES ('OR001',Geography::Point(-95.583394,35.284589, 4326))
,('OR002',Geography::Point(-95.583494,35.284579, 4326))
SELECT *...
August 14, 2013 at 12:57 pm
I suppose if you don't mind manually doing this, you could locate each of your CPTs in Google maps. For each one right click in the map and select...
August 13, 2013 at 6:05 pm
dwain.c (8/12/2013)
Is it too late for me to join the party?
Not at all and very nice 🙂
Another variation building on Chris's CHARINDEX and removing the CASE.
WITH SampleData (A, B) AS...
August 12, 2013 at 7:54 pm
ChrisM@Work (8/12/2013)
SELECT
NDCNumber,
IngredientCost = CAST(CASE
WHEN Trailer IN ('{','A','B','C','D','E','F','G','H','I')
THEN LEFT(ingredientcost,LEN(ingredientcost)-1) + CAST(CHARINDEX('{','{ABCDEFGHI')-1 AS VARCHAR(1))
WHEN Trailer IN ('J','K','L','M','N','O','P','Q','R','}')
THEN '-' + LEFT(ingredientcost,LEN(ingredientcost)-1) + '1'
END AS MONEY)/100
FROM ...
I...
August 12, 2013 at 1:06 pm
Hi Drew
Not sure if I have this right (first time I've heard of overpunch), but this may be what you are after
-- An inline table function to convert overpunch to...
August 11, 2013 at 10:08 pm
Viewing 15 posts - 286 through 300 (of 475 total)