0

約 20 列と 5000 行を超えるテーブルがあります。行ごとに、最初の null 値を string に置き換えようとしています"end"

私が持っているもの:

BEGIN TRANSACTION;

/* Create a table called dataframe */
CREATE TABLE dataframe(id integer primary key, col1 text, col2 text, col3 text, col4 text, col5 text);

/* Create few records in this table */
INSERT INTO dataframe VALUES(1,'a',null,null,null,null);
INSERT INTO dataframe VALUES(2,'a','b',null,null,null);
INSERT INTO dataframe VALUES(3,'a','c','d','e', null);
INSERT INTO dataframe VALUES(4,'a','c','d',null, null);
INSERT INTO dataframe VALUES(5,'a','c',null, null, null);
COMMIT;

/* Display all the records from the table */
SELECT * FROM dataframe;

必要なもの:

BEGIN TRANSACTION;

/* Create a table called dataframe */
CREATE TABLE dataframe(id integer primary key, col1 text, col2 text, col3 text, col4 text, col5 text);

/* Create few records in this table */
INSERT INTO dataframe VALUES(1,'a','end',null,null,null);
INSERT INTO dataframe VALUES(2,'a','b','end',null,null);
INSERT INTO dataframe VALUES(3,'a','c','d','e', 'end');
INSERT INTO dataframe VALUES(4,'a','c','d','end', null);
INSERT INTO dataframe VALUES(5,'a','c','end', null, null);
COMMIT;

/* Display all the records from the table */
SELECT * FROM dataframe;

FIRST_VALUE()行レベルで使用できますか?

4

1 に答える 1