Viewing 15 posts - 58,501 through 58,515 (of 59,053 total)
An interesting mix of delight and pain... sort of like sweet-and-sour sauce with a generous dose of horse-radish... and I love horse-radish!
And thanks for all you do behind the scenes,...
December 27, 2005 at 9:20 pm
Andrew... This also works... and, it's set based.... just substitute a column name for @Number in the formula...
-- Math.Round(3.454,2) -> 3.45
-- Math.Round(3.455,2) -> 3.46
-- Math.Round(3.445,2) -> 3.44
-- Math.Round(3.456,2)...
December 27, 2005 at 11:10 am
If you mean round to the nearest whole number, then simply converting to INT will do...
DECLARE @Amount1 MONEY
SET @Amount1 = 7.49
DECLARE @Amount2 MONEY
SET @Amount2 = 7.50
DECLARE...
December 25, 2005 at 9:45 pm
You bet... Merry Christmas.
December 25, 2005 at 9:25 pm
You are new at this...
Try this, Josh...
UPDATE yourtable
SET Name = RTRIM(SUBSTRING(Subject,1,CHARINDEX('#',Subject,1)-1)),
Paid = RTRIM(SUBSTRING(Subject,CHARINDEX('#',Subject,1),
CHARINDEX('$',Subject,1)-CHARINDEX('#',Subject,1))),
Amount = RTRIM(SUBSTRING(Subject,CHARINDEX('$',Subject,1),
CHARINDEX('/',Subject,1)-CHARINDEX('$',Subject,1))),
CheckNo = RTRIM(SUBSTRING(Subject,CHARINDEX('/',Subject,1)+1,999))
FROM yourtable
And, let's hope...
December 25, 2005 at 7:13 am
Assuming that the column you are parsing is called "ParseThis" and your table name is called "yourtable", this will work PROVIDED that you always have all 4 parts...
SELECT...
December 24, 2005 at 12:31 pm
No, but I'm thinking that this is "Death by SQL" of the same magnitude as disabling the automatic recalculation of statistics.
December 24, 2005 at 12:08 pm
"Books Online" describes both FLOAT and REAL as follows:
"Approximate number data types for use with floating point numeric data. Floating point data is approximate; not all values in the data...
December 24, 2005 at 12:04 pm
If your job only runs on Saturday, then you've done it the most efficient way.
December 24, 2005 at 11:52 am
Carl, sometimes there's just no application to be had... SQL is it.
Mark, the reason you are getting the error is that you must either have SA permissions or your DBA...
December 22, 2005 at 12:41 am
Very cool, jratwork... I have a similar un-natural aversion to correlated subqueries and I had my doubts when I saw the "<" in the correlated subquery... but I just ran...
December 20, 2005 at 5:18 pm
First, this isn't a DB2 forum and not all SQL's are created equal. That, notwithstanding, you say "it didn't work"... if you got an error message, is sure would be...
December 19, 2005 at 11:10 pm
"Online AnonProfile" seems a bit paranoid as a "handle" to me
... whatever...
This little ditty should help you in your quest for primary...
December 19, 2005 at 10:59 pm
You can't do this with a constraint... you'll need to use a trigger or, maybe, you can also try a "calculated column".
December 19, 2005 at 9:28 pm
Viewing 15 posts - 58,501 through 58,515 (of 59,053 total)