Solved

sql snytax

Posted on 2011-09-19
2
261 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
2 Comments
 
LVL 21

Accepted Solution

by:
JestersGrind earned 500 total points
Comment Utility
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
Comment Utility
thank you!!
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now