Questions tagged as 'sql'

2
answers

SQL / LINQ vs. Data to feed graphic

I am trying to generate a query in VS2015 with Linq (here, I exemplified in SQL, to speed up my tests directly in the bank) that returns the data grouped and counted from 6 months ago, it happens that in some of the months there is no data soon...
asked by 05.12.2017 / 13:16
2
answers

search with select in database with repeated records

I'm doing a select in my bank, that is, Postgres , and there are more records coming .. For example, id_pessoa comes a 10 more record than it should come .. SELECT pac.cns, pac.cns_responsavel, pac.cpf_responsavel,...
asked by 05.12.2017 / 02:18
1
answer

Sql does not return column name

I have two tables with TEAM other MATCH_DETAILS . The TEAM table has the id column and is the primary key. I made two relationships from the TEAM table to MATCH_DETAILS . In MATCH_DETAILS assumed as...
asked by 05.12.2017 / 13:49
2
answers

How to work the return of a query select max?

I'll be brief: When trying to work the values of a query that uses MAX, I get the error: Use of undefined constant protocol - assumed 'field name'. Table: Select:$atestados=$conect->query("select max(protocolo) from atestados"); P...
asked by 27.11.2017 / 17:28
0
answers

Error Microsoft SQL Server Management Studio 17

Every time I try to start Management Studio with this error: Can not find one or more components. Please reinstall the application. I have already uninstalled SQL Server and Management Studio and reinstalled. I have also installed Microsof...
asked by 28.11.2017 / 00:58
0
answers

Transaction with Laravel

DB::connection('gtsql')->beginTransaction(); $seriefat = DB::connection('gtsql')->table('se_seriefat') ->where('c_codserie', 'FO')->first(); echo $seriefat->c_numultdoc; sleep(15); DB::connecti...
asked by 28.11.2017 / 14:53
0
answers

How to compare php password with sql that was inserted with PASSWORD

I enter the password with the PASSWORD argument in my example query. INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, PASSWORD(value2), value3, ...); I want to know if I have the value of an input to know if it is the...
asked by 10.12.2017 / 21:22
1
answer

Doubt SQL query via primary key in PHP?

I'm starting in the PHP language, and I need to return a simple query made in sql from a variable that gets the value entered by the user. Being that, it will only display the result of the primary key search. But in the code below what you type...
asked by 25.11.2017 / 01:38
1
answer

Database Modeling (Relationship Entity Model)

Good afternoon, In the image below you have the modeling of the following problem. I have users where they will belong to modules (physical module, portuguese module, chemical module) are 3 modules in total.UM and only UM (1) of modules can c...
asked by 25.11.2017 / 20:32
0
answers

Doubt with Image fields in Postgres

I used the sql down to view the size of all the tables in the database, it returned me a total of 98 MB, but since the database has images that are written as Binary and they are not in a table, I would like to do a backup of the bank without th...
asked by 23.11.2017 / 18:43