Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6750539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:49:10+00:00 2026-05-26T12:49:10+00:00

In SQL Server, ISNULL() function has to same type of parameters. check_expression Is the

  • 0

In SQL Server, ISNULL() function has to same type of parameters.

check_expression

Is the expression to be checked for NULL. check_expression can be of
any type.

replacement_value

Is the expression to be returned if check_expression is NULL.
replacement_value must have the same type as check_expresssion.

How can I use it with different type of parameter? I want to use with date and string parameter like this ISNULL(A.DATE, '-')

NOTE: Type of A.DATE is datetime.

EDIT-1: My full query which is getting 0 row:

    SELECT A.pkey as KREDİ, A.SUMMARY , D.BayiStatu AS STATU, D.Sorumlu AS SORUMLU, C.BayiSonuc as SONUC, ISNULL( CONVERT(VARCHAR(25), A.CREATED, 112) , '-' ), ISNULL( CONVERT(VARCHAR(25), A.RESOLUTIONDATE, 112) , '-' ), dbo.CUSTVAL(11931, A.ID, 'S') AS BAYİ, ISNULL( CONVERT(VARCHAR(25), dbo.GetLastStatuTime(A.ID), 112) , '-' ) AS SON_STATU_TAR,j2.SUMMARY, ISNULL( CONVERT(VARCHAR(25), j2.CREATED, 112) , '-' ), ISNULL( CONVERT(VARCHAR(25), j2.RESOLUTIONDATE, 112) , '-' ), j3.SUMMARY, ISNULL( CONVERT(VARCHAR(25), j3.CREATED, 112) , '-' ), ISNULL( CONVERT(VARCHAR(25), j3.RESOLUTIONDATE, 112) , '-' )
FROM AspNetServicesDB.dbo.SONUC_MAP C, JİRA.resolution E, jira.issuestatus B, AspNetServicesDB.dbo.STATU_MAP D, Jira.jiraissue A
INNER JOIN Jira.issuelink i
    ON i.SOURCE = A.ID and i.SEQUENCE = 0
INNER JOIN Jira.jiraissue As j2
    ON i.DESTINATION =j2.ID 
LEFT JOIN Jira.issuelink i2 
    ON i2.SOURCE = A.ID  and i2.SEQUENCE = 1
LEFT JOIN Jira.jiraissue As j3 
    ON i2.DESTINATION = j3.ID
WHERE A.issuestatus = B.ID
AND 'BAŞARAN OTOMATİV' = dbo.CUSTVAL(11931, A.ID, 'S')
AND B.pname = D.JiraStatu collate Turkish_CS_AI
AND A.issuetype != 11
AND A.RESOLUTION = E.ID
AND E.pname = C.JiraSonuc collate Turkish_CS_AI

EDIT-2: But this working

select ISNULL( CONVERT(VARCHAR(25), A.RESOLUTIONDATE, 112) , '-' )
FROM Jira.jiraissue A

Could be the reason JOIN ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:49:11+00:00Added an answer on May 26, 2026 at 12:49 pm

    You can’t. The ISNULL function is used by itself as a query result column, or in an expression that eventually is a column in the query result. All fields/rows in a column must have the same data type. So you’ll have to choose.

    One solution would be to cast the DATE to string, so the result is always a string, but i feel the best solution would be to return NULL for empty dates and let the presentation layer decide whether or not the NULL dates should be shown as - and in what format the non-null dates should be displayed (client locale settings).

    With presentation layer, I mean anything that displays or outputs this data, which can be a web page, a CSV exporter, a reporting tool, whatever.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In SQL Server you can use the IsNull() function to check if a value
Can i apply SUM() within an ISNULL() .... Consider my following sql server select
is there a function in SQL Server 2005 that returns NULL [or a boolean
How can I pass a null parameter to a SQL server query. I have
In MS SQL-Server, I can do: SELECT ISNULL(Field,'Empty') from Table But in PostgreSQL I
SQL Server 2005/2008 Express edition has the limitation of 4 GB per database. As
SQL Server (2005/2008) Each of the below statements have the same result. Does anyone
SQL Server procedure can return result sets. I have a table emp(emp__id, emp__name, ...)
I want to use CLR table-valued function in SQL Server 2008, which accesses a
Is there a way to query SQL Server XML type so that for an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.