Viewing 15 posts - 1 through 15 (of 27 total)
Basically, I'm trying to convert a column that has a negative amount to be placed inside parentheses. So far I've been playing with the following: SELECT TransactionDate, Cast(Replace(Replace(TransactionValue,'-', '($'), '',')')...
August 21, 2013 at 11:07 am
This also executed successfully with the same results, but less coding. Thanks for your input.
June 24, 2008 at 12:59 pm
Perfect. It generated a RowNumber column. Thanks again.
June 24, 2008 at 12:02 pm
Add an auto numeric colum from the query statement you provided.
Example;
No. / Player / Events / Wins
1 / Player1 / 4 / 1
2 / Player2 / 4 / 1
3...
June 24, 2008 at 11:33 am
Lynn,
Is there a way to add an auto numeric column on the left of the results?
Example:
1
2
3
4 and so on
June 24, 2008 at 11:12 am
WOW. That worked out perfect. You're awesome. Thank you so much.
June 24, 2008 at 10:29 am
Player / Events / Wins
Player1 / 4 / 1
Player2 / 4 / 1
Player3 / 4 / 0
Player4 / 4 / 2
I need to know the number of events a player...
June 24, 2008 at 10:04 am
Hope this helps.
INSERT INTO Player (PlayerFirst) Values ('Player1')
INSERT INTO Player (PlayerFirst) Values ('Player2')
INSERT INTO Player (PlayerFirst) Values ('Player3')
INSERT INTO Player (PlayerFirst) Values ('Player4')
INSERT INTO Event (EventDate, CourseID) Values ('01/01/2008', '1')
INSERT...
June 24, 2008 at 9:36 am
You are correct. Somehow I had @yearnum twice. You are the man.
Thanks for your quick response and knowledge.
May 9, 2008 at 12:05 pm
I copied the codes you provided and got the following error message:
Must declare the scalar variable "@year"
Thanks for your help.
May 9, 2008 at 11:47 am
Lynn,
Everything works perfect. It does not round off the number as you stated. Thank you so much for your help. 😀
May 6, 2008 at 6:28 pm
Lynn,
Great job. I integrated your codes as advised and made a few changes with my tables. The formula works great.
How can I Delete all numbers after the tenth digit (truncate)....
May 6, 2008 at 1:39 pm
dbo.Event
EventID (PK) / int
EventDate / smalldatetime
CourseID (FK) / int
dbo.Course
CourseID (PK) / int
CourseName / varchar(50)
CourseRating / decimal(11, 1)
CourseSlope / int
dbo.Player
PlayerID(PK) / int
PlayerFName / varchar(50)
dbo.Score
ScoreID(PK) / int
EventID(FK) / int
Player(FK) / int
ScoreAdjTotal...
May 6, 2008 at 12:50 pm
I got it. Thank you very much for your help. I made a few changes in the query.
SELECT EventID, EventLocation, Convert(Varchar, EventDate, 103) AS EventDate
FROM Event
Works like a charm.:D
May 5, 2008 at 1:25 pm
Viewing 15 posts - 1 through 15 (of 27 total)