1. SQL DELETE - I am having a bad day
Hello, Anders! Thanks for the info. -- Eric den Doop www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8
2. where EXISTS / NOT EXISTS do not work (I am really pannic) - SQL Server
3. a really bad ordering problem
I've been on this one for more than a month. I've tried it countless
different ways, but it's just not happening. It's an ordering problem.
I want this: 20 2Yr, 45 3Yr, 3 5Yr, 42 10Yr, 2 30Yr
I'm getting this: 28 5Yr, 9 2Yr, 8 10Yr, 2 30Yr, 45 3Yr
at one time I had them ordered properly, but now for some reason they're not
ordered sequentially. It's pretty much always 5Yr, then 2Yr, 3Yr and 10Yr.
this project is 2-fold. first i do a ton of calculations and insert the
results of which into a stats table. then i report from that stats table.
the relevant portion of the insert is this:
CASE
WHEN LEFT(symbol,3)='USM' THEN '2Yr,' WHEN LEFT(symbol,3)='USL' THEN '3Yr,'
WHEN LEFT(symbol,3)='USN' THEN '5Yr,' WHEN LEFT(symbol,3)='USO' THEN '10Yr'
WHEN LEFT(symbol,3)='USP' THEN '30Yr' END,
i make a couple declarations in the reporting proc:
DECLARE @termsBBBB varchar(150), @delimiter char,@termsEEEE varchar(150)
SET @delimiter = ','
SELECT @termsBBBB = CAST(countOftrades as varchar)+ ' ' + term +
COALESCE(@termsBBBB , '')
FROM (SELECT Sum(countOftrades) as countOfTrades, term from dbo.stats2
WHERE destination = 'BBBB' group by term) a
SELECT @termsEEEE = CAST(countOftrades as varchar)+ ' ' + term +
COALESCE(@termsEEEE , '')
FROM (SELECT Sum(countOftrades) as countOfTrades, term from dbo.stats2
WHERE destination = 'EEEE' group by term) a
and i pull it out in the report proc like this:
SELECT Destination as
EndPoint,RTRIM(LEFT(CONVERT(char(16),CAST(SUM(countOfTrades) AS
MONEY),1),13)) AS ' #Trades',
RTRIM(LEFT(CONVERT(char(16),CAST(SUM(Volume) AS MONEY),1),13)) AS 'Volume ',
RIGHT(' '+ISNULL (CONVERT(varchar(20),SUM(TotalUSD),1),0.00),20) AS
'Total $ ',+LTRIM(RTRIM(@termsBBBB)) AS Terms
from dbo.stats2 WHERE destination in ('BBBB')
group by destination
UNION
SELECT Destination as
EndPoint,RTRIM(LEFT(CONVERT(char(16),CAST(SUM(countOfTrades) AS
MONEY),1),13)) AS ' #Trades',+' '+
RTRIM(LEFT(CONVERT(char(16),CAST(SUM(Volume) AS MONEY),1),13)) AS 'Volume
',+' '+
RIGHT(' '+ISNULL (CONVERT(varchar(20),SUM(TotalUSD),1),0.00),20) AS
'Total $ ',+' '+LTRIM(RTRIM(@termsEEEE)) AS Terms
from dbo.stats2 WHERE destination in ('EEEE')
group by destination
is anybody able to direct me as to why I'm not ordering the values
sequentially?
--Lynn
4. Are Cursors in Triggers really bad? - SQL Server
i am learning Newsgroups
6. View Jpg image stored in a MS SQL Image field - Access Forms Programming
7. Display an image whos image path is stored in a SQL DB
I'm fairly new to asp.net. What is the syntax for the string to pull and image path from a DB and display that image based on the given path? I am trying to stay away from actually storing images in my DB and want to just store their paths there. I'd appreciate any help anyone can provide. Thanks. JESTER
8. I am in NewJersy and i am willing tolearn T-Sql Programming - SQL Server