Viewing 15 posts - 151 through 165 (of 188 total)
oops i meant:
select
client,
article,
sum(case when quantity > 0 then quantity else 0 end) delivered,
sum(case when quantity < 0 then quantity else 0 end) returned
from #temp
group by client, article order by 1
April 28, 2004 at 10:11 am
select
client,
article,
sum(case when quantity > 0 then 1 end) delivered,
sum(case when quantity < 0 then 1 end) returned
from #temp
group by client, article order by 1
You can DTS into Excel, or you...
April 28, 2004 at 10:07 am
Note too that Unix will return a line feed and no carriage return!
Use something like this to find out what the ascii value of each character is:
declare @i as integer
declare...
February 23, 2004 at 10:44 am
Maybe something like this?
INSERT INTO tbl_report
SELECT * FROM tbl_report_refresh r
WHERE NOT EXISTS
(SELECT *
FROM tbl_report s
WHERE
s.col_a = r.col_a
AND
s.col_b = r.col_b
ETC...
February 9, 2004 at 9:01 am
I completely misunderstood what you wanted - I thought you were looking for a single character from the entire field!
Well, congratulations on your success! Half the fun of this...
December 12, 2003 at 11:29 am
Okay, let's try this:
1 - Test the length of the text field and compare it to the varchar length. Are you getting all of it? I have...
December 12, 2003 at 9:57 am
That was pretty vague. Maybe you need to answer ThomasH's questions before going any further. I assumed you could convert to varchar. Maybe not? Is this...
December 12, 2003 at 9:12 am
Good point, Frank! I only need enough accuracy to report on call center stats, so I don't need the accuracy of a larger data type in my report level...
December 12, 2003 at 8:45 am
Numeric(9,2) only uses 5 bytes, gives you two places past the decimal, say for cents. Good choice for storing bank account or credit card balances; or call center (time)...
December 11, 2003 at 4:03 pm
DECLARE @test-2 AS VARCHAR(8000)
DECLARE @TEST2 AS VARCHAR(8000)
DECLARE @POS AS INT
DECLARE @POS2 AS INT
SELECT @test-2 = (SELECT CAST(TEST AS VARCHAR(8000)) FROM TBL_TEST)
SET @POS = (SELECT DATALENGTH(@TEST)-PATINDEX('%[1-9]%', REVERSE(@TEST))+1)
SELECT...
December 11, 2003 at 2:55 pm
Position needs to refer to A SINGLE character somewhere. What character do you want to find? The '5'? The'g' at the end of the sentence? The first...
December 11, 2003 at 2:33 pm
Then maybe you want the line feed character at the end of the last line in bullet(5)?
Jules
December 11, 2003 at 1:57 pm
I'm sorry, please explain. (1)%(5) refers to the entire bulleted list? So you want to find the position of the '1'? The '5'? Or both? ...
December 11, 2003 at 1:49 pm
SELECT DATALENGTH('aa(1)aaaaa(1)aaaaa')-PATINDEX('%[(1)]%', REVERSE('aa(1)aaaaa(1)aaaaa')) --will give you the position of the '1' in the middle.
You will still have to jack with it a bit depending on whether you want the position...
December 11, 2003 at 1:01 pm
Okay, I tried this several different ways and could not produce your successful results. DTS was only able to successfully run the drop/create statements against an existing page$, not...
December 8, 2003 at 12:41 pm
Viewing 15 posts - 151 through 165 (of 188 total)