What you mean by the ddl?

|
MasterZiv 2021-11-28 05:32:17
The is special command LOAD for this.
MasterZiv 2021-11-28 05:35:23
If it don’t work show what you do and what you get.
MasterZiv 2021-11-28 05:36:06
Var 2021-11-27 22:51:14
{message: “Fail!”, employees: [], error: “Data too long for column ‘profileImage’ at row 1”}
employees: []
error: “Data too long for column ‘profileImage’ at row 1”
message: “Fail!”

Show your query, your table DDL and the error message.

MasterZiv 2021-11-28 05:37:31
Var 2021-11-27 22:51:14
{message: “Fail!”, employees: [], error: “Data too long for column ‘profileImage’ at row 1”}
employees: []
error: “Data too long for column ‘profileImage’ at row 1”
message: “Fail!”

You either should extend your field size, or shorten your data for this field

flyingdragons 2021-11-28 08:29:19
svart 2021-11-28 01:49:44
depends on your requirements and load you can go with either NDB or with galera. both have their own cons and pros. also try to take a look at vitess (i do not have any experience with it but it claims that it can scale database horizontally)

Awesome. Thank you

MasterZiv 2021-11-28 09:13:56
Var 2021-11-27 22:51:14
{message: “Fail!”, employees: [], error: “Data too long for column ‘profileImage’ at row 1”}
employees: []
error: “Data too long for column ‘profileImage’ at row 1”
message: “Fail!”

Don’t send pictures

Var 2021-11-28 09:16:13
MasterZiv 2021-11-28 05:36:06
Show your query, your table DDL and the error message.

const EmployeeModel = dbConnection.define(’employee-data33′, {
id:{
type: Sequelize.INTEGER,
autoIncrement:true,
primaryKey:true,
},
userName: {
type: Sequelize.STRING
},
emailId: {
type: Sequelize.STRING
},
mobileNo: {
type: Sequelize.STRING
},
profileImage: {
type: Sequelize.STRING(1000000000)
}

});

MasterZiv 2021-11-28 09:24:04
Var 2021-11-28 09:16:13
const EmployeeModel = dbConnection.define(’employee-data33′, {
id:{
type: Sequelize.INTEGER,
autoIncrement:true,
primaryKey:true,
},
userName: {
type: Sequelize.STRING
},
emailId: {
type: Sequelize.STRING
},
mobileNo: {
type: Sequelize.STRING
},
profileImage: {
type: Sequelize.STRING(1000000000)
}

});

What is this? This is not SQL

Var 2021-11-28 09:25:24
MasterZiv 2021-11-28 09:24:04
What is this? This is not SQL

mysql2

Var 2021-11-28 09:26:11
i am trying to send base64 image string data to databasebut doesn’t working
Var 2021-11-28 10:01:22
MasterZiv 2021-11-28 09:24:04
What is this? This is not SQL

this is mysql2 , please give any guidence

MasterZiv 2021-11-28 10:07:39
Var 2021-11-28 10:01:22
this is mysql2 , please give any guidence

This is not SQL code if you need help on mySQL send mySQL SQL code, otherwise solve your problems without our help

Peter Hans 2021-11-28 21:22:16
Good evening everybody. I have a Sql related question.
Peter Hans 2021-11-28 21:23:36
I have a table with states and their population for certain years. Now I have to query 10 of the states with the biggest population growth for the year 1990. I have no clue how to achieve it.
Peter Hans 2021-11-28 21:25:25
I tried the following
Select capitalcity_sid, name,
Name – Lag (name) over (order by population_1990 asc) as growth from states.
piterden 2021-11-28 21:28:35
Peter Hans 2021-11-28 21:25:25
I tried the following
Select capitalcity_sid, name,
Name – Lag (name) over (order by population_1990 asc) as growth from states.

Show us your DDL

Peter Hans 2021-11-28 21:28:50
What you mean by the ddl? 🙈
piterden 2021-11-28 21:29:26
I mean exactly DDL. Nothing that would surprise you
piterden 2021-11-28 21:30:02
Peter Hans 2021-11-28 21:28:50
What you mean by the ddl? 🙈

mysql_en-14405.jpg

Peter Hans 2021-11-28 21:30:06
Ah I see. I’m from Germany here it is translated into German. Therefore I was irritated. One sec pls.
Peter Hans 2021-11-28 21:31:08
You don’t accept photos right? I have to install Telegram for pc to take a Screenshot of the table
piterden 2021-11-28 21:31:34
No, not screenshot
piterden 2021-11-28 21:31:39
Text
piterden 2021-11-28 21:31:58
The structure
Peter Hans 2021-11-28 21:32:06
OK, lemme install Telegram for a sec. I have to copy it from the pc
Peter Hans 2021-11-28 21:33:26
The query is in German though. I’m not sure whether you can work with it 🙈 I can translate it to English if you want
Peter Hans 2021-11-28 21:36:44
CREATE TABLE Laender (
Kuerzel char(2) NOT NULL,
Hauptstadt_sid int DEFAULT NULL,
Name varchar(100) NOT NULL,
Einwohner_1960 int DEFAULT NULL,
Einwohner_1970 int DEFAULT NULL,
Einwohner_1980 int DEFAULT NULL,
Einwohner_1990 int DEFAULT NULL,
Einwohner_2000 int DEFAULT NULL,
Einwohner_2010 int DEFAULT NULL,
Einwohner_2015 int DEFAULT NULL,
Einwohner_2019 int DEFAULT NULL,
Flaeche int DEFAULT NULL,
Beitritt int DEFAULT NULL,
Stimmen int DEFAULT NULL,
PRIMARY KEY (Kuerzel),
KEY Hauptstadt_sid (Hauptstadt_sid),
CONSTRAINT laender_ibfk_1 FOREIGN KEY (Hauptstadt_sid) REFERENCES Staedte (sid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
Peter Hans 2021-11-28 21:37:13
this is the create table statement. Laender means states etc.
piterden 2021-11-28 21:39:22
So just calculate what you need
Peter Hans 2021-11-28 21:42:05
I might explain my problem. I can do aggregation in a simple way. However I never had to calculate growth over a period. I is a task to practice for the exams. the prof has never showed us the way how to do it. And on internet I don’t find any useful links that explain how to do such queries.
piterden 2021-11-28 21:55:19
Peter Hans 2021-11-28 21:42:05
I might explain my problem. I can do aggregation in a simple way. However I never had to calculate growth over a period. I is a task to practice for the exams. the prof has never showed us the way how to do it. And on internet I don’t find any useful links that explain how to do such queries.

The key word of this is YOU

piterden 2021-11-28 21:55:26
Not we
piterden 2021-11-28 21:56:03
db-fiddle.com
piterden 2021-11-28 21:56:31
piterden 2021-11-28 21:56:03
db-fiddle.com

Make the working example here

Peter Hans 2021-11-28 21:56:58
I understand. I posted a code snippet above to show what I have done so far. But it is wrong. So I thought I might get a hint or help for what I have fiddled out wrong.
|