1jaws
asked on
easy sql
select convert(varchar, o.dateSubmitted, 111) as dateSubmitted from tblCustomer
I have that query that I want to say if dateSubmitted is not null that time I want to "paid" on my datagrid...how can I make that happen?
I have that query that I want to say if dateSubmitted is not null that time I want to "paid" on my datagrid...how can I make that happen?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ignore what I said... sorry.. thanks for the help.
first of all your query syntax is wrong. there is no alias as o
select convert(varchar, o.dateSubmitted, 111) as dateSubmitted from tblCustomer as o
-->
select
case when o.dateSubmitted is null then 'Paid' else convert(varchar, o.dateSubmitted, 111) end as dateSubmitted
from tblCustomer as o
select convert(varchar, o.dateSubmitted, 111) as dateSubmitted from tblCustomer as o
-->
select
case when o.dateSubmitted is null then 'Paid' else convert(varchar, o.dateSubmitted, 111) end as dateSubmitted
from tblCustomer as o
ASKER