Viewing 15 posts - 6,826 through 6,840 (of 10,144 total)
Krasavita (7/20/2011)
For some reason the code is not working properly, can someone assist me...Thank you
Ensure that each result expression evaluates to the same datatype:
DECLARE @col005 VARCHAR(15) = 'SOME$VA.LUE-'
SELECT CASE
WHEN @col005...
July 20, 2011 at 9:02 am
Hi Yatish
Thanks for providing more sample data. Here's a modified version of the same query which deals with it:
;WITH Calculator1 AS (
SELECT...
July 20, 2011 at 4:25 am
Hello Yatish
This works. The principle is the same as the previous version.
CREATE TABLE #History(
HistoryID INT,
Id INT,
letterId INT,
Letter VARCHAR(2),
HistoryRank INT)
INSERT INTO #History VALUES (1101795,265805,5,'NW',11)
INSERT INTO #History VALUES (1119363,265805,5,'NW',10)
INSERT INTO...
July 20, 2011 at 2:37 am
Eric M Russell (7/19/2011)
July 19, 2011 at 9:31 am
Jeff Moden (7/18/2011)
I'm just double checking here... has anyone come up with a solution that actually works for this?Scratch that. I see that R. Brush has one.
+2
July 19, 2011 at 2:07 am
barsuk (7/15/2011)
Declare @FileName varchar (100)Set @FileName ='12304208483483'
SELECT REPLACE(Left(Convert(Varchar,Convert(Money,@FileName),1),Len(Convert(Varchar,Convert(Money,@FileName),1)) - 3),',','.')
Try '12304208348300'
July 18, 2011 at 2:06 am
Ninja's_RGR'us (7/14/2011)
ChrisM@Work (7/14/2011)
Ninja's_RGR'us (7/14/2011)
ChrisM@Work (7/14/2011)
You can use a variable in TOP in 2k8, not sure about 2k5:DECLARE @RowsToReturn INT
SET @RowsToReturn = 50
SELECT TOP (@RowsToReturn) * FROM ...
I'm on 2K5 and...
July 14, 2011 at 10:00 am
Ninja's_RGR'us (7/14/2011)
ChrisM@Work (7/14/2011)
You can use a variable in TOP in 2k8, not sure about 2k5:DECLARE @RowsToReturn INT
SET @RowsToReturn = 50
SELECT TOP (@RowsToReturn) * FROM ...
I'm on 2K5 and I tested...
July 14, 2011 at 9:53 am
You can use a variable in TOP in 2k8, not sure about 2k5:
DECLARE @RowsToReturn INT
SET @RowsToReturn = 50
SELECT TOP (@RowsToReturn) * FROM ...
July 14, 2011 at 9:45 am
Tim O'Brien-386385 (7/13/2011)
By far the easiest...convert to money, format, strip decimal point:Print Reverse(SubString(Reverse(Convert(varchar,Convert(Money,1234567891011),1)),4,99))
Prints 1,234,567,891,011
Neither this solution nor the one above it meet the requirements of the OP, which was for...
July 14, 2011 at 3:17 am
dva2007 (7/13/2011)
...What is the best way to do this?...
Ensure that your table structure is correct and that it is feasible to obtain the results you expect from the data you...
July 13, 2011 at 5:40 am
Michael Valentine Jones (7/12/2011)
July 13, 2011 at 2:09 am
Steve Jones - SSC Editor (7/12/2011)
greenBack in Cambridge for the week. Things are very green here, compared to Denver with its light rain and no humidity.
The UK is at its...
July 12, 2011 at 9:46 am
You're welcome. Thank you for the feedback. Always be sure to vigorously check any code you obtain from any forum.
July 12, 2011 at 6:58 am
yatish.patil (7/12/2011)
Thanks for your reply, I did the change and below is the output for the same
...
If you look at the Last two rows for ID 2...
July 12, 2011 at 5:24 am
Viewing 15 posts - 6,826 through 6,840 (of 10,144 total)