Questions tagged as 'sql'

1
answer

Standard information for a record

I have a [produto] table and a [produto_embalagem] table, which can contain multiple packages of a single product. The discussion is whether the default product packaging should be a markup in the [produto_embalagem] tabl...
asked by 11.12.2017 / 14:00
0
answers

Bulk Insert bringing information without accent

Expensive, Good afternoon! I have a problem when I perform a bulk insert from excel to SQLServer, I have a column named city and when I do the bulk insert and I include the information in the database they lose their settings, eg SÃO PAULO...
asked by 12.12.2017 / 16:37
1
answer

How to return only unmatched records in a JOIN? [duplicate]

I have a question regarding the use of JOIN in SQL in this case: I have a produtos table and a destaques table that contains the id of the product. I need to make a query that returns only the records that are n...
asked by 17.10.2016 / 00:50
0
answers

Get data from excel sheet and insert into SQL SERVER database

I want to know if you have a way to get the records of a worksheet and play to a SQL-SERVER table, is there a possibility?     
asked by 08.12.2017 / 13:23
1
answer

How to check null fields in sql?

The trigger I have to do:    A user can only assign a rating to an offer if he has purchased it (reserve with estado = pago ). On the other hand, one of the two rating and comment attributes has to be NOT NULL . What I have do...
asked by 08.12.2017 / 02:00
1
answer

Create a freight calculation table in sql server 2012

I have the following question and I need the help of the experts, so I can follow up on my project. I need to create a freight table just like the image below, but I do not know if I create a single table or create several tables, because then I...
asked by 08.12.2017 / 13:28
1
answer

It takes a lot of queries in mysql

Hello friends I'm having a hard time finding what's wrong in my SELECT code in mysql, this is taking over 70sec I do not know why. Someone there to help me please? Code: SELECT id_aluno, nome_aluno, ano_lectivo, data data_pagamento_m, nome_...
asked by 06.12.2017 / 17:02
1
answer

How do I pick up unseen items?

I use the following select to grab the items already seen: $sql = $conn->query("SELECT * FROM views b, news a WHERE a.status = 'true' AND a.id = b.id_news AND b.ip = '$ip' ORDER BY a.id DESC LIMIT 6"); Where: $ip = $_SERVER['REMOTE_...
asked by 21.12.2017 / 00:58
0
answers

Calling data from a form on the same HTML page

I want to call data already entered in a form and use it on the same HTML page where I will use it in a SQL query. Depending on the number of municipalities, several IPL3 fields will be generated. The intent is to save the data to a table in...
asked by 08.12.2017 / 17:48
1
answer

What command do I use to place a parameter in a list in sql?

I was running a test appeared an issue saying to create a list in which the values were not greater than 6, I could not understand very well doing this.     
asked by 04.12.2017 / 14:55