Viewing 15 posts - 46 through 60 (of 98 total)
Hello tendayit and all,
I see two estrange points (to me) in your code, lets me explain:
First, your table TRANSACTION_TEMP has a clustered index but, being a temp table, you need...
September 7, 2011 at 5:26 am
Hello,
I tried to solve this problem in a chain of transformations, see the code below
create table #temp (
...
September 2, 2011 at 8:32 am
Hello,
I agree with kramaswamy in the strategy adopted, splitting the query in two parts because there are two different criteria to group results.
To join these two parts I prefer the...
August 4, 2011 at 3:48 am
Hello,
thanks for your kind answer.
I realize that you have limited SQL skills and hardly understand the code put by all people, but there is a previous question in your problem,...
July 20, 2011 at 5:47 am
Hello,
as I understand, in your drug inventory you put drugs and locations; each drug in a location 'FLR-%' must be present in another location 'PX-%' and both locations must be...
July 19, 2011 at 6:27 am
Hello,
as Kevin said your DELETE instruction lacks on a WHERE clause, I suppose you coded something like
DELETE TOP 3000 FROM table WHERE too_old_record
Do you need...
July 7, 2011 at 4:04 am
From http://www.idescat.cat/territ/BasicTerr?TC=9 you can extract all cities in Catalonia 🙂 . For the rest of the world I can't help you.
June 30, 2011 at 7:39 am
Of course, UNION will remove duplicate rows but not different rows with the same key. Maybe you have rows within bot your live table and your history table with the...
June 27, 2011 at 3:09 am
Hello Dan,
you don't need any NOT EXISTS clause (nor any OUTER JOIN clause) because UNION will remove any duplicate rows. So if there is a row that belongs to both...
June 27, 2011 at 3:05 am
Hello,
the CHARINDEX function will return you the first occurrence for the desired character, so you need invoke this functions three times in a row.
WITH X AS (SELECT '-1-2-33' AS stream
UNION...
June 20, 2011 at 6:05 am
the problem resides in the select statement
That's true?, nice, now the problem is located and you can fix it.
I am unsure on where to include the actual table Havbed with...
June 9, 2011 at 9:09 am
Hello,
as I deduce from your query, the field ACCESS_INSTANT has unique values. Is TableA indexed by this field?, is TableB indexed by this field too?
If so you can alter your...
June 9, 2011 at 3:26 am
Hello again,
executing this code,
select stuff ((
SELECT ',' + CASE
WHEN placement IN (1, 2, 5, 7) THEN CAST(TotalPlacement AS VARCHAR(9))
ELSE ''
END
FROM (
SELECT 1 as placement, 10 AS TotalPlacement
UNION SELECT 2,...
June 9, 2011 at 2:18 am
Hello,
well, that's I understand from your post:
- For placements 1, 2, 5, 7 you want to show the count number (any value including zero),
- for other placements you want to...
June 8, 2011 at 8:20 am
Hello,
As I understand you want to replace ',0' by ',', right?.
Try it,
SELECT ',' + CASE
WHEN TotalPlacement = 0 then ''
WHEN Placement IN (1, 2, 5, 7) THEN CAST(TotalPlacement AS...
June 8, 2011 at 4:30 am
Viewing 15 posts - 46 through 60 (of 98 total)