User Profile

Collapse

Profile Sidebar

Collapse
troy howard
troy howard
Last Activity: Mar 23 '11, 08:56 PM
Joined: Jan 6 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How to compare a value from one table to another, and have an new field populated?

    Good evening,

    I am trying compare a value from one table to another, and have an new field populate. I am using a Case Statement in order to try to accomplish this task.

    The error is: Msg 156, Level 15, State 1, Line 9
    Incorrect syntax near the keyword 'SELECT'.
    Msg 102, Level 15, State 1, Line 9
    Incorrect syntax near ')'.
    Msg 156, Level 15, State 1, Line 11
    Incorrect syntax near the...
    See more | Go to post

  • troy howard
    started a topic What am I doing wrong on this one?

    What am I doing wrong on this one?

    Good afternoon,

    I always enjoy writing sql, even more when I run into things like this. I am trying to get the count between two dates as well as add aliases to the table which you will see after the "as" statements. I am receiving the error Incorrect syntax near the keyword 'as'.

    Here is my code:

    SELECT
    LoanNum,
    RecordNum,
    RequestNum,
    case
    when CloseDt is...
    See more | Go to post
No activity results to display
Show More
Working...