Two table’s purchase and sales ‘s column date column has been concatenated as date row. GROUP_CONCAT(purchase.date,’,’,sales.date) AS date But both of them can be blank, according to data input. So …
Tag: mysql
Is it possible to select multiple tables with different quantity attributes?
Note: I looked in this forum and could not find the solution I’m looking for. These are the tables I created: library: name, registry book: date, author, code Question 1: Is it possible to …
a little bit confusing about a syntax on my databases MySQL
i try to check my databases with : I also try to check my databases on : Why are the results different with SHOW DATABASES; and SELECT Db FROM mysql.db; ? Can i update my databases on mysql.db tables ?? Thanks in advance. Answer mysql.db id an internal system table, hence it is hard to find official documentation related to
SQL: How to use REPLACE INTO with two tables and only if specific values match?
I have two tables with the same columns and ids. Table 1 contains the main records. Table 2 contains updated records and new records. Table 1: ID | STATUS | CONTENT | etc.. …
MONTHNAME in Portuguese MYSQL
I´ve got a huge query (In a PHP file) that gives me a monthname from some dates: Is there a way to insert my language inline with MONTHANAME? Something like: I don´t want to write case for eveymonth to transform ‘Dec’ to ‘Dez’ and so on, this will take too long. Answer Unfortunately in MySQL this cannot be done dynamically
How to find last values in mySQL tables sorted by datetime?
I have a problem finding the right values from mySQL Database. I have 1 table with 3 main columns: —+————+—————+——————–+ id + patient + temperature + …
Remove matching values by comparing two database tables Codeigniter/Mysql
In my codeigniter model I have this function : public function getUserNo() { $query = $this->db->query(“select userno from Users where active=1”); return $query->result_array(); } …
Distinct sql based on condition More than two columns
Below is the table structure. Column one contains strings which might be present in more than one row. I want to write a query in such a way column1 value is only repeated once such that row where …
“group by desc” syntax error on mysql 8.0 which is fine on 5.7
The statement is like SELECT * FROM db.table group by id desc; Would raise an error like 15:02:24 SELECT * FROM db.table group by id desc LIMIT 0, 10 Error Code: 1064. You have an error in …
Port MySQL script to MS SQL -> simultaneous data asignement and retrieval
I have been trying to make this work for hours but I can’t really find a way to do it. I have a MySQL script that I need to migrate to MS SQL 2014, however, I can’t seem to make it work. As far as I …