Solved

sql snytax

Posted on 2011-09-19
2
298 Views
Last Modified: 2012-06-27
case
                  when datePaid is not null then 'Paid'
                  else 'Not Paid'
            end as status    

I want to bring saying if my hold column shows true .. that time I want to say Hold between Paid and not paid... how would do that .. cant get the snytax correct...
0
Comment
Question by:1jaws
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
JestersGrind earned 500 total points
ID: 36563286
CASE WHEN DatePaid IS NOT NULL THEN 'Paid'
          WHEN HoldColumn = 1 THEN 'Hold'
          ELSE 'Not Paid'
END AS Status

Is that what you are looking for?

Greg

0
 

Author Closing Comment

by:1jaws
ID: 36563303
thank you!!
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Syntax 6 53
Tracking Problematic Page Splits 1 50
SQL Query Works in SQL 2008 & 2012 But Not SQL 2016 15 100
Populating a table from inside a trigger 2 17
I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question