Skip to main content
Stack Overflow
  1. About
  2. For Teams

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
-2 votes
1 answer
180 views

In this example I wanted to replace every NULL value in the Quantity column with the mean of the column. I'm using CASE here to achieve that but what ends up happening is instead of replacing NULL ...
1 vote
1 answer
97 views

I have the following SQL to create a materialized view and the SQL seems reasonable to me but it's unclear from Postgres docs what should happen in this case. I am listing the columns when creating ...
1 vote
1 answer
116 views

I'm trying to get partitioned tables from a postgres DB. Our partitions have the date in them in various formats which I'm extracting like this SELECT tab.relname AS table_name, (CASE ...
0 votes
0 answers
41 views

I have developed a Lightning Web Component (LWC) and exposed it as a Quick Action on the Case object. However, the action does not appear in the Feed section of the Case record page. Is it a ...
1 vote
1 answer
157 views

I am using SQL Server 2017 and I am writing an UPDATE statement with a CASE expression. In the update statement I am having an issue with the calculation. It is a simple calculation when I cast the ...
0 votes
4 answers
187 views

I have a bash script that uses a space-delimited string to keep track of all the possible valid arguments: FRUITS="apple orange pear banana cherry" I use a bash case statement because some ...
NateT's user avatar
  • 312
4 votes
1 answer
125 views

From a 6-character string in TERM_CODE_KEY I need to produce a calculated result as column academic_yr: -- TERM_CODE_KEY is of type VARCHAR2(6) and returns values of the form YYYYMM SELECT ...
Ross's user avatar
  • 81
0 votes
2 answers
162 views

I have the following SQL query (VERY simplified): SELECT Column1, Column2, Column3, Column4, CASE WHEN [Field1] = Condition1 THEN Value1 WHEN [Field1] = Condition2 ...
BT_SO's user avatar
  • 25
-1 votes
2 answers
79 views

I have 2 tables: DEPT: dept_no C N 1 200 100 2 300 150 3 400 200 and EMP: dept_no employee_no Task_status Salary 1 1 C 1 2 N 2 1 C 2 2 C with column Salary has to be calculated. Task status is C is ...
Sfdclearner's user avatar
4 votes
2 answers
138 views

I'm often using dplyr case_when with several logical conditions. Because case_when evaluates sequentially, sometimes an earlier case applies and then is "taken off" the list even further ...
Arthur Yip's user avatar
  • 6,420
1 vote
1 answer
125 views

I need group speed by ram and return MAX(speed), where at least one NULL in speed values will return NULL. ram speed 128 600 128 600 128 750 128 750 128 800 128 900 32 400 32 NULL 32 500 64 450 64 500 ...
-1 votes
1 answer
53 views

I have a table that looks like this: id|week|start_date 1,4, 0026年10月23日T00:00:00.000+00:00 2,5, 0026年09月22日T00:00:00.000+00:00 3,6, 0026年09月25日T00:00:00.000+00:00 I am trying to write a SQL statement ...
0 votes
1 answer
104 views

I am trying to use the SQL commands COUNT and GROUP BY to show the number of students with each letter grade, but I'm having difficulty in doing so. A new column that I created contains a letter grade ...
Colton's user avatar
  • 1
1 vote
2 answers
75 views

Using R, I want to check the ManufShortName column and if there is the word 'BLANK', then I want to return the word 'BLANK' in another column named AnalysisNotesCode in the same row. If there is a ...
SharonP's user avatar
  • 59
-1 votes
1 answer
118 views

Consider this SELECT CASE WHEN 1=1 THEN 1 WHEN 1=1 THEN 1/0 END This returns 1. A clear example of how the WHENs are evaluated in order. However, when I do this: DECLARE @...
gebruiker's user avatar
  • 125

15 30 50 per page
1
2 3 4 5
...
650

AltStyle によって変換されたページ (->オリジナル) /