Posts by mcardoso • 793 points
32 posts
-
4
votes2
answers1176
viewsQ: Two apache installations on the same server
I have a windows server with Bitnami (only with Apache running) and another apache installed manually. Since Bitnami Apache is for Postgresql database and Apache installed manual is for Mysql. It’s…
-
2
votes1
answer406
viewsQ: Error starting Powershell on Windows Server 2008 R2. How to resolve?
I have installed SQL Server 2014. When starting Powershell in Windows Server 2008 R2 and I do the command "sqlps" to test, happens this error that shows in the image below... NOTE: On another…
-
1
votes0
answers490
viewsQ: Export Mysql users and permissions to another server
I am making another server with the same databases as the previous server (I already migrated the databases) and would like to migrate the users and permissions from this previous server to the new…
-
1
votes2
answers917
viewsQ: Mysql: Windows or Linux?
Which one performs best for dedicated server with Mysql considering several complex calculations in Stored Procedure and Functions?
-
2
votes1
answer248
viewsQ: "create temp table" in Rigger in Postgresql
It is possible to create an Insert Trigger in a "Table1" using "CREATE TEMP TABLE" in its structure and feed a "Table2"?
-
3
votes1
answer92
viewsQ: Postgressql - Stored Procedure
What’s wrong with this stored procedure? CREATE OR REPLACE FUNCTION public.sp_teste ( IN varchar, OUT codigo integer, OUT setor varchar, OUT grupo integer ) RETURNS SETOF record AS $$ begin return…
-
2
votes1
answer63
viewsQ: Fetch data from Mysql in Postgresql
Is there any way to connect Mysql with Postgresql, so that Mysql DBMS is used but selecting data that is in Postgresql?
-
2
votes1
answer167
viewsQ: How to keep data up to date in two tables?
There are two tables that should be kept updated in different databases, "user" of the "DB1" and "user" of the "DB2" database. In this case, it would be the "password" field to be updated. I have a…
-
1
votes2
answers14029
viewsQ: Mysql - Create temporary table according to dynamic SELECT
Is there any way to create a temporary table according to a select with columns created dynamically, as shown in the examples below? ex: SELECT idCentroCusto, 'Dez/14', 'Jan/15', 'Fev/15', 'Mar/15',…
-
2
votes1
answer462
viewsQ: Mysql - Selecting columns from a dynamic subselect
Doubt: How to select and add dynamic fields? I have a dynamic consultation: SELECT * FROM ( SELECT @TotalSpendMensal ) AS t The result of the variable @Totalspendmonthly is dynamic, ie returna for…
-
1
votes1
answer50
viewsQ: Mysql - Reading data in a string
There is a Cost Center table called "ccusto", in it, contains Ids ("code" field) that would like to be returned in a SELECT. However, the data needs to be compared to a string with comma separation,…
-
-1
votes1
answer557
viewsQ: Delete on an UPDATE Trigger
How can I delete a record that is being entered in a specific condition in a Rigger? example: USE `scompraslenovo`; DELIMITER $$ CREATE TRIGGER `precad_fornecedor_BUPD` BEFORE UPDATE ON…
-
3
votes1
answer1106
viewsQ: Change "Character" and "collation" settings
I have a configuration in a database as follows: SERVIDOR 1 show variables like '%version%'; innodb_version 1.1.8 protocol_version 10 slave_type_conversions version 5.5.19-log version_comment MySQL…
-
3
votes3
answers1579
viewsQ: Select the two highest values of a tuple
I have an appointment that displays the following result: ID | v1 | v2 | v3 | 54384 | 2.4 | 8 | 2.55 | 54385 | 5.6 | 1 | 3.24 | How to do, in a SELECT, the selection of only the two largest values…
-
2
votes2
answers438
viewsQ: How to give ALIAS with current "month/year"?
Considering the query below, I need the ALIAS where there are SOMAS, to be "nomeMes/anoAtual" ("ABR/14","MAI/14"...) dynamically. SELECT fornecedor.codigo, UPPER(fornecedor.razaosocial) AS…
-
0
votes1
answer35
viewsQ: Mysql Query - Transfer
I have the following appointment: SELECT despesa.codRequisicao, despesa.histDespesa, despesa.despesaPassagem, despesa.despesaTaxi, despesa.despesaHotel, despesa.despesaRefeicao,…
-
1
votes1
answer1171
viewsQ: Update in another row in the same table by Trigger
Is there any way to update in the same table, being in another row, through a after insert or before insert?
-
0
votes1
answer101
viewsQ: How to sum up the days according to a period?
How to sum up days according to a period? Example: +--------------+--------------+--------+----------+ | data_ini | data_fim | codfun | qtd_dias | +--------------+--------------+--------+----------+…
-
1
votes1
answer228
viewsQ: View [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
About VIEW in database... What is the difference between the three algorithms when creating a VIEW with [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]? What each one does?…
-
5
votes2
answers427
viewsQ: View "View" from Postgres in Mysql. Is it possible? How to Do?
Is there any way to view a View created in Postgres and view in Mysql? If so, how to configure?
-
1
votes1
answer879
viewsQ: How do I set up apache HTTPS for a specific page and HTTP for the others?
I need a specific page to work via HTTPS with a specific certificate. How to configure httpd.conf, httpd-ssl and httpd-vhosts.conf files in apache? has some other file to modify?
-
0
votes2
answers2020
viewsQ: RAD Studio XE6 does not connect to any database!
Program used: RAD Studio XE6 (32bits). Problem: When creating a new Desktop or Mobile project, when trying to configure the connection to any database, whether by Firedac or dbExpress, the following…
-
0
votes1
answer12979
viewsQ: Error Code: 1406. Data Too long for column 'txtContability' at Row 1
In Mysql.. I am wanting to do UPDATE in a text field, the same has about 300 characters and does not allow to do it, informed that it is too long. I’ve tried changing the field type up to…
-
1
votes3
answers1488
viewsQ: Foreign Key in another database?
Doubt in Mysql... What are the possible problems that may arise when making a foreign key in different databases? Taking into consideration this type of foreign key and a View that fetches…
-
6
votes3
answers25254
viewsQ: Subtract date and display in YEARS, MONTHS and DAYS
SGBD: Mysql Problem: How to replace the current date with a specific date and return the value in YEARS, MONTHS and DAYS in a query? Example: DADOS DataAdmissao dataAtual 2010-04-07 2014-06-27 (este…
-
5
votes3
answers51716
viewsQ: SQL Server - Check duplicate data in two simultaneous fields
DBMS: SQL Server 2014; Problem: I need to know which records are duplicated, so that it is checked in two simultaneous fields, that is, if the field "CPF" with the value '83971465842' and the field…
-
3
votes1
answer475
viewsQ: "Linked Server" with Mysql
DBMS: SQL SERVER 2014 + Mysql 5.5 What are the syntax of SELECT, INSERT and UPDATE instead of using the "OPENQUERY" function, when connecting through the SQL SERVER Linked Server, connecting in…
-
6
votes1
answer876
viewsQ: Combination of 4 numbers in Mysql
SGBD: Mysql Problem: List all possible combinations between the numbers "1,2,3,4", so that they do not recur between them. Example: 1 2 3 4 12 13 14 21 23 24 31 32 34 41 42 43...…
-
1
votes1
answer1533
viewsQ: List sub-query table with main query
SGDB: Mysql. PROBLEM: I need to somehow relate the subquery (being table and highlighted field Funcionario.codZona1) with the table "Zone", which is in the main query. Is there any way? Table…
-
6
votes2
answers2105
viewsQ: timediff() limited to 838:59:59, how to resolve?
SGBD: MYSQL Problem: I am adding HOURS to a TIME field type and the expected result is above 838:59:59, but is visible only up to this limit. How to solve? SELECT he.empresa,…
-
1
votes4
answers1172
viewsQ: How to get values separated by "<BR>" in Mysql?
The idea is simple...I need to get values from a table (by performing SELECT) that are separated by <BR> of a STRING field and then store in a table, inserting each separation, a record.…
-
9
votes2
answers5943
viewsQ: Convert row to column
I have a field called "Shift" kind STRING, storing data in Mysql in this way: '1,2,3,4,5,6,7,8,9' I need this string line to transform (transpose) into a single column (in this case, it would be the…