calculated-columns Questions

3

Solved

Is there any way to check in VBA if a specific column of a table (ListObject) in Excel is a calculated column (as in https://support.microsoft.com/en-us/office/use-calculated-columns-in-an-excel-ta...
Puree asked 9/1, 2013 at 16:54

4

The naive way of doing this that comes to mind would be: SELECT name, lev FROM (SELECT name, levenshtein(name, *parameter*) as lev FROM my_table) WHERE lev = (SELECT MIN(lev) FROM (SELECT name, ...
Asquint asked 10/9, 2010 at 18:20

2

Solved

I have two columns, both int's, Wins and Losses. I have a calculated column WinPercentage as a decimal(14,3), I want this to be: WinPercentage = (Wins + Losses) / Wins What's the syntax for that...
Searle asked 4/11, 2010 at 0:50

6

Solved

Is there something similar to DATEFROMPARTS(year, month, day) in SQL Server 2008? I want to create a date using the current year and month, but my own day of the month. This needs to be done in one...
Diverge asked 22/10, 2013 at 16:45

3

Solved

Here is a simplified example of my df: ds = pd.DataFrame(np.abs(randn(3, 4)), index=[1,2,3], columns=['A','B','C','D']) ds['sum'] = ds.sum(axis=1) which looks like A B C D sum 1 0.095389 0.556978...
Eloiseloisa asked 29/8, 2013 at 7:40

2

Solved

How could I convert the values of column 'count' to absolute value? A summary of my dataframe this: datetime count 0 2011-01-20 00:00:00 14.565996 1 2011-01-20 01:00:00 10.204177 2 2011-01-20 02:0...
Brakesman asked 16/3, 2015 at 12:46

2

In excel I have a worksheet with over 30,000 rows. Sample data is shown in the image below. About a dozen of the columns have formulas which really slow down the work whenever I update a cell. I wo...
Area asked 10/4, 2018 at 1:2

5

Solved

lets say I have a huge select on a certain table. One value for a column is calculated with complex logc and its called ColumnA. Now, for another column, I need the value from ColumnA and add some ...
Leia asked 3/3, 2011 at 12:58

4

Is it possible to loop through the all column names while inside a trigger? Scenario: To log all the columns of a table that have been modified. If some values did not change, do not log those one...
Afghanistan asked 15/6, 2014 at 9:29

6

I have 3 main columns (Points, TotalPoints, DateCreated) in a table using Entity Framework. Scenario - Think of the "Fun Arcade" where you earn tokens for playing games and can then excha...
Inkberry asked 28/10, 2021 at 22:0

3

Snowflake does not document its Virtual Column capability that uses the AS clause. I am doing a migration and needing to filter out virtual columns programatically. Is there any way to identify tha...

9

Solved

I have this query, but its not working as it should, with c as (select month(bookingdate) as duration, count(*) as totalbookings from entbookings group by month(bookingdate) ), d as (SE...

6

I have a pandas dataframe that looks like this: portion used 0 1 1.0 1 2 0.3 2 3 0.0 3 4 0.8 I'd like to create a new column based on the used column, so that the df looks like this: portio...
Tumpline asked 20/11, 2014 at 14:14

1

I have 2 dataframes - one is a data source dataframe and another is reference dataframe. I want to create an additional column in df1 based on the comparison of those 2 dataframes df1 - data source...
Methaemoglobin asked 4/5, 2021 at 13:50

1

Solved

I'm trying to get data from a table of a MySQL database using TypeORM in my Express.js project. I'm using QueryBuilder to get data. My implementation: const result = await this.repository.createQue...
Loiretcher asked 18/3, 2021 at 8:34

1

I am using PostgreSQL 12, is it possible to use a query on a generated column? I mean, using in the column creation GENERATED ALWAYS AS (some query) STORED
Porbeagle asked 29/1, 2021 at 14:26

4

Solved

I have a SQL query SELECT TABLE_SCHEMA + TABLE_NAME AS ColumnZ FROM information_schema.tables I want the result should be table_Schema.table_name. help me please!!
Positively asked 8/8, 2014 at 16:13

1

Solved

Is it possible to update a column (automatically) with "current_timestamp" in PostgreSQL using "Generated Columns", whenever the row gets update? At present, I am using trigger ...
Sheriff asked 8/7, 2020 at 11:4

7

Solved

I need to have one column in my database calculated by database as (sum of rows) - (sum of rowsb). I'm using code-first model to create my database. Here is what I mean: public class Income { [K...

2

Solved

CREATE TABLE my_app.person ( person_id smallserial NOT NULL, first_name character varying(50), last_name character varying(50), full_name character varying(100) generated always as (concat(firs...

3

What would be the syntax (if it's possible), for example, to create a table called Car_Model that has a foreign key to a table Car_Make, and give Car_Make a column which is the number of Car_Models...
Bosnia asked 14/7, 2009 at 11:2

4

Solved

I have a computed column created with the following line: alter table tbPedidos add restricoes as (cast(case when restricaoLicenca = 1 or restricaoLote = 1 then 1 else 0 end as bit)) But, now I...
Homestead asked 3/3, 2010 at 15:44

4

Solved

I have a DataFrame ave_data that contains the following: ave_data Time F7 F8 F9 00:00:00 43.005593 -56.509746 25.271271 01:00:00 55.114918 -59.173852 31.849262 02:00:00 63.990762 -64.699492 52...
Madigan asked 29/7, 2015 at 11:13

2

Solved

Based on this question, I've created a function and added it to my database. Now I want to use that function as a calculated column: -- Based on https://mcmap.net/q/118137/-how-to-strip-all-non-al...

2

I am trying to create a column which contains only the minimum of the one row and a few columns, for example: A0 A1 A2 B0 B1 B2 C0 C1 0 0.84 0.47 0.55 0.46 0.76 0.42 0.24 0.75 1 0.43 0.47 0.93 0....
Yves asked 25/8, 2014 at 5:40

© 2022 - 2024 — McMap. All rights reserved.