Questions tagged as 'sql'

1
answer

Generate empty line (null) in sql server

I do not know much about sql, but I need to do the following: User informs a number. Sql generates the amount entered by the user of blank / null records. After generating the blank records, execute an sql query. In the last item the...
asked by 06.04.2017 / 17:33
1
answer

How to troubleshoot "3183" error when importing a database in SQLSERVER 2012

Good afternoon! To begin with, I warn you that I am a layman. I need to run a local bank on my machine to work on a project. I installed the programs: SQLSERVER Express 2012 SQL Management Studio 2012 I use a Macbook Pro and squeeze a Win7...
asked by 02.03.2017 / 17:10
1
answer

How to return the sequence of the week in the reported period?

Good morning, I need to return the sequence of the week of the month (of the reported period) in two fields, start date and end date. In PHP and MySQL . Currently returns the number of the week in the year, follow print for a better...
asked by 17.05.2018 / 14:59
1
answer

Create select to return last time something was different from zero

I have a table called Estoque , where it has the columns NOME_PRODUTO , DATA , among others. The idea is that when I make a SELECT Using the date as a parameter, all the products that were in stock on that day are return...
asked by 21.02.2017 / 01:55
2
answers

Delete record that is being duplicated in the query with the inner join

I am doing a query to my database and in this query I use an INNER JOIN to join two tables! But I have a problem, because I do not know how to handle the JOIN very well, and this is causing a small problem. In my current database I am join...
asked by 10.02.2017 / 07:07
1
answer

I can not do a function that returns a Semester of a Date in PostgreSQL

I'm trying to do a conversion that returns a semester of a date, but this error appeared here CREATE or REPLACE FUNCTION semestre ( data timestamp ) RETURNS INTEGER AS $$ BEGIN IF data <= 6 THEN return 1; ELSE return...
asked by 16.06.2017 / 14:38
1
answer

Save results from a query to an array

Good afternoon! I need to get the results of this query: sql = "SELECT controle.ID FROM controle WHERE BP = '" & controlectform.nmbpbox.Value & "';" And save to an array. Subsequently I will do a for each in that array and I will...
asked by 03.04.2017 / 21:40
2
answers

Doubt with SQL Query

I have a stock movement table with the following columns and data: table moves id | operacao | prodinsumo | qtde ---------------------------------- 1 | 1 | 25 | 6 2 | 2 | 10 | 3 3 | 10 | 17 |...
asked by 03.04.2017 / 21:00
2
answers

sql command does not run via php

I'm having a problem with my bd query. I want to make a login page with the following form: <form method="post" action="Login.php"> Email:<br> <input class="form-control" placeholder="Seu email" type="text" name="em...
asked by 10.01.2017 / 20:07
1
answer

Validate multiple forms at once - Simulated

I'm creating a mock site and I'm having a hard time fixing it because I do not know how to validate numerous forms at once. What happens: I have questions that are randomly selected by the database; These questions are inside a form wit...
asked by 11.03.2017 / 00:08