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

  • SEARCH
  • Home
  • 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 6692069
In Process

The Archive Base Latest Questions

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

I am writing a small case statement in sql query as follows: SELECT [##OT_NET_EQUATIONS_RHS_IDS].SYS_ID,

  • 0

I am writing a small case statement in sql query as follows:

 SELECT [##OT_NET_EQUATIONS_RHS_IDS].SYS_ID,
        [##OT_NET_EQUATIONS_RHS_IDS].NODE_ID,
        [##OT_NET_EQUATIONS_RHS_IDS].NODE_EQ_NO, 
        [##OT_NET_EQUATIONS_RHS_IDS].EQ_TYPE,
        CASE EQ_TP_OFFSET
          WHEN 'MULTIPLE' THEN '1'
          WHEN 'SINGLE' THEN '0'
        END AS EQ_TP_OFFSET,
        [##OT_NET_EQUATIONS_RHS_IDS].VAR_NAME,
        [##OT_NET_EQUATIONS_RHS_IDS].VAR_SET,
        [##OT_NET_EQUATIONS_RHS_IDS].VAR_SUBSET, 
        [##OT_NET_EQUATIONS_RHS_IDS].RHS_NODE_ID, 
        [##OT_NET_EQUATIONS_RHS_IDS].RHS_NODE_VAR_ID,
        CASE RHS_RELN
          WHEN 'EQ' THEN '0'
          WHEN 'LE' THEN '1'
          WHEN 'GE' THEN '2'
          WHEN 'MIN' THEN '3'
          WHEN 'MAX' THEN '4'
        END AS RHS_RELN,
        [##OT_NET_EQUATIONS_RHS_IDS].RHS_OBJECT,
        [##OT_NET_EQUATIONS_RHS_IDS].RHS_VAR_TYPE,
        [##OT_NET_EQUATIONS_RHS_IDS].RHS_TP_OFFSET,
        [##OT_NET_EQUATIONS_RHS_IDS].TIME_PRD,
        [##OT_NET_EQUATIONS_RHS_IDS].RHS_VALUE,  
        [##OT_NET_EQUATIONS_RHS_IDS].SUB_NET_ID, 
        CASE RHS_OBJECT
          WHEN 'OBJECTIVE' THEN 'OBJECTIVE'
        END AS FUNC_NAME 
   FROM ##OT_NET_EQUATIONS_RHS_IDS;

I am getting error cannot convert varchar value ‘multiple’ to data type int…any help.?
i am not sure why i am getting this error though i have put one ”.

  • 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-26T05:49:30+00:00Added an answer on May 26, 2026 at 5:49 am

    I’m guessing EQ_TP_OFFSET is an int, so when Sql Server is evaluating the CASE, it tries to compare 'MULTIPLE‘ to the value of EQ_TP_OFFSET and cannot convert it to an int.

    Looking at it again, I’m thinking perhaps EQ_TP_OFFSET is an int and you meant to code the case to select a value more meaningful than 1 and 0. Perhaps it should be the other way around?

    CASE EQ_TP_OFFSET 
        WHEN 1 THEN 'MULTIPLE'  
        WHEN 0 THEN 'SINGLE' 
    END AS EQ_TP_OFFSET
    

    Same would go for RHS_RELN.

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

Sidebar

Related Questions

when writing small functions I often have the case that some parameters are given
I have an application where I am reading and writing small blocks of data
I'm trying to practice my F# by writing small console scripts in F# in
Coming from a PHP background, I'm used to writing small functions that return a
I am currently writing a small calendar in ASP.Net C#. Currently to produce the
I'm writing a small tool in C# which will need to send and receive
I'm writing a small web server in Python, using BaseHTTPServer and a custom subclass
I'm writing a small article on humanly readable alternatives to Guids/UIDs, for example those
I'm writing a small application in VB.NET and I would like some of the
Im just writing a small Ajax framework for re-usability in small projects and i've

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.