Forum Replies Created

Viewing 15 posts - 1 through 15 (of 27 total)

  • RE: Format varchar to currency.

    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,'-', '($'), '',')')...

  • RE: Query Question

    This also executed successfully with the same results, but less coding. Thanks for your input.

  • RE: Query Question

    Perfect. It generated a RowNumber column. Thanks again.

  • RE: Query Question

    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...

  • RE: Query Question

    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

  • RE: Query Question

    Same results. Option 1 and 2 works great.

  • RE: Query Question

    WOW. That worked out perfect. You're awesome. Thank you so much.

  • RE: Query Question

    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...

  • RE: Query Question

    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...

  • RE: Query by Year

    You are correct. Somehow I had @yearnum twice. You are the man.

    Thanks for your quick response and knowledge.

  • RE: Query by Year

    I copied the codes you provided and got the following error message:

    Must declare the scalar variable "@year"

    Thanks for your help.

  • RE: Multiple Table Calculation

    Lynn,

    Everything works perfect. It does not round off the number as you stated. Thank you so much for your help. 😀

  • RE: Multiple Table Calculation

    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)....

  • RE: Multiple Table Calculation

    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...

  • RE: SmallDateTime Query

    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

Viewing 15 posts - 1 through 15 (of 27 total)