Questions tagged as 'sql'

1
answer

Using Group By in SAS Guide

I'm having trouble using the command GROUP BY , in SAS . By definition, SAS only accepts GROUP BY if a summary function is used in SELECT . Until then, okay. Turning Proc below, the result exits correctly: proc sql; c...
asked by 31.07.2014 / 17:35
2
answers

mysql organizing entries in the database

I wanted to know if it is possible to reorder the table entries in mysql, overwriting the deleted entries, and without breaking the other tables. If it is possible, which command would you use and give me some examples. For example: In table...
asked by 01.08.2014 / 04:23
1
answer

Does anyone know a good program to create database in mysql? [closed]

Does anyone know a good program to create database in mysql and then I can send to phpmyadmin?     
asked by 04.08.2014 / 16:13
2
answers

BD sales register

Good morning. I'm doing a sales web app, and I want to return the sales ID to insert into the intermediate product_product table (multiple products in 1 sale). I tried it that way, but obviously I could not: <?php $connect = mysqli_conn...
asked by 21.12.2018 / 15:00
1
answer

Add values to a database by PHP

I'm trying to add values to a database through PHP. I'm using PHPMyAdmin for both databases and also for the site in question. At this moment the code I have is the following, I present my doubts at the end: <html> <head>...
asked by 12.12.2018 / 22:23
1
answer

save in the txt file the result of the sql query in firebird using Delphi

I need to save the result of a query inside the txt file by separating by a delimiter, I am extremely new to delphi and firebird, so any help is welcome code below: procedure TForm1.btPesquisarClick(Sender: TObject); var arquivo: TextFile;...
asked by 13.12.2018 / 15:15
2
answers

SQL query leaving a custom column data

Hello I would like to know if it is possible to mount a query that returns a table like this: The data of appB and appC comes from a select count in the Calls table that returns me the number of sessions found per application, howeve...
asked by 14.12.2018 / 14:29
1
answer

Insert random data into a table that has foreign keys (Oracle)

I have a table "usuario" (idUsuario, nome, departamentoId) and another table "departamento" (idDepartamento, nome) . I would like to enter random data in the user table, but for this, I need to consider only the department IDs (F...
asked by 03.05.2014 / 03:12
3
answers

Select Group by Month

SELECT dataVen, Sum(valorTotal) as valorTotal FROM cad_cr2 Group by MONTH(dataVen) The above query returns the following values:    Iwishitwerethatway,groupedbymonth:   I've done a lot of research and try, but without success.     
asked by 28.12.2018 / 19:57
2
answers

select month and year from a datetime field

I have a field of type datetime and I need to do a query based only on the month and year. When searching, I noticed that there is a extract function, but it separates only one value from datetime . example: SELECT * FRO...
asked by 05.11.2018 / 15:12