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 8499955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:48:28+00:00 2026-06-11T00:48:28+00:00

The actual result of the following Query is NULL select semid from programvariantterm where

  • 0

The actual result of the following Query is NULL

select semid from programvariantterm where programvariantid = 240

But when I try the following statement, it gives 0 rows:

declare @semid int
set @semid = -1
select semid from programvariantterm 
where programvariantid = 240 and semid = nullif(@semid,-1)
  • 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-06-11T00:48:29+00:00Added an answer on June 11, 2026 at 12:48 am

    I think you’re confusing NULLIF and ISNULL a little bit.

    Your statement would work with the following ISNULL:

    where programvariantid = 240 and @semid = ISNULL(semid,-1)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code (taken from actual script): $result=mysql_query($sql); while($row=mysql_fetch_assoc($result)) { $auth_token=$row['oauth_token']; $auth_token_secret=$row['oauth_token_secret'];
I've got the following query: SELECT name, GROUP_CONCAT(job SEPARATOR ','), count(*) FROM users GROUP
The following code gives me the following: $getexpenses = SELECT sum(expense_amount) FROM projects_expense WHERE
Consider the following result from a hypothetical reg query : ..>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MediaPlayer /v
I know in an actual query, you can use auto_increment=1 but how is this
The result set of the following 2 SQL scripts look the same. But there
I have the following query: Dim query = From m In Me.DataWorkspace.Products_dbData.MaterialList _ Where
I have the following query to one of my database tables: select count(*) as
Following SQL query: select distinct hotel.country 'Country', hotel.id 'Hotel ID', hotel.Name'Name', room.id 'Room ID'
I am trying to select some data in the following manner: SELECT column FROM

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.