Questions tagged as 'sql'

1
answer

Query with subquery

I need to answer this question: 4) Search for the name and address of the customers who have all the films in the store. I can not test the query, but would it be something like this? SELECT C.nome, C.endereço from CLIENTES C WHERE EX...
asked by 15.10.2016 / 18:13
1
answer

DataDirectory C #

I need a flexible connection string so that it automatically searches the program folder for the .mdf file . My following code looks like this: public Form1() { string relative = @"..\..\Database1.mdf"; string absolute...
asked by 04.10.2016 / 05:44
2
answers

Problems to generate SQL command

Hello everyone. I'm creating a project that handles user registration. In this project there will be several types of users. To simplify, let's call the types of 1,2 and 3. Depending on the type of user, the screens and features that he can acce...
asked by 03.09.2016 / 03:16
1
answer

View of two tables

I have two tables, TABLE_1 and TABLE_2 and I want to create a view with some fields of both where the id_event (existing in both) is equal. CREATE TABLE table_1 ( id INT, id_event INT, col1_t1 varchar(255), ...); CREATE TABLE...
asked by 02.09.2016 / 15:54
1
answer

Function in Access equivalent to COALESCE

Hello. I'm trying to build an INSERT with auto numbering in Access, but I'm not getting it. In SQL Server, MySql and PostGres use the COALESCE function, but I do not find this function in Access. I usually use it as follows: INSERT INTO CON...
asked by 31.07.2016 / 21:07
1
answer

Uncaught Error: Call to a member function prepare () on null in [closed]

I'm trying to register my client address and it gives the following message: Uncaught Error: Call to a member function prepare() on null in I have no idea what it might be, I query it this way: $this->Conexao->prepare($sql)->exe...
asked by 01.08.2016 / 21:39
1
answer

How to update magento stock by consuming a CSV file

I am using a manual stock synchronization module created by BRTSync, but I need to perform an automatic synchronization process, for example, consuming the fields of a CSV already generated by another software every two hours. I already have the...
asked by 04.08.2016 / 18:48
2
answers

Finding data not registered in postgres

I have field records that have fields with years and months of this type: id mes ano ---------- 1 1 2005 ---------- 2 2 2005 ---------- 3 4 2005 ---------- 4 5 2006 ---------- My question is: Is it possible to find in...
asked by 14.09.2016 / 14:46
1
answer

Query with datadiff returning 0 in sql server result

I have the following query: SELECT DATEDIFF(hh, MIN(BATIDA), MAX(BATIDA))AS HORAS FROM ARELBATIDATRANSITOVIEW WHERE CHAPA = 3187 AND BATIDA IS NOT NULL AND SEQUENCIALBATIDA IN (2,3) GROUP BY DATA ORDER BY DATA DESC Example:...
asked by 19.10.2016 / 03:51
1
answer

Database table relationship [closed]

I have a registration form where it contains personal, professional, additional, financial and production information, my doubt, as it gives many columns, I believe more than 50 fields. Is it advisable to leave everything on a table? Or separ...
asked by 10.08.2016 / 03:00