case condition in min max values

Shambhu Rai 1,406 Reputation points
2022-07-14T19:15:04.293+00:00

Hi Expert,

I wanted to update the target table based on the conversation table . if the value is between 100 and 200 then

if the value is between 200 and 400 then

create table source1
(car int,cycle int)
insert into source1
values(150,250)
220826-image.png

create table conversation_table
(min int ,max int, speed char, rating char)
insert into conversation_table
values(100,200,'Higher','good'),
(200,400,'Highest','better')
220902-image.png

create table target1
(property char, value int, speed char, rating char)
expected output
220795-image.png

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,776 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,808 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,459 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,555 questions
{count} votes

6 answers

Sort by: Most helpful
  1. Olaf Helper 40,901 Reputation points
    2022-07-15T05:19:46.4+00:00

    How often do you want to ask the same question; you already got answer on it?

    https://learn.microsoft.com/en-us/answers/questions/927359/case-condition-in-min-max-values.html

    0 comments No comments