Questions tagged as 'sql'

1
answer

Database Modeling

Specifying the tables that I am in doubt are, in my case, a company work for the college, the tables: Entry and Diagnosis, where the input is when someone brings some equipment, and then the diagnosis is made, but the diagnosis has more than 40...
asked by 25.05.2016 / 15:49
1
answer

How to check if something was passed to the php page?

It's even hard to ask because I do not know if it's okay, but I'll try to explain it as best I can. I have a page where I will use the php switch case to decide the action according to what is passed. However, if the page is only triggered witho...
asked by 14.02.2016 / 01:42
2
answers

Sql server - default

Good evening, I created a table to test the sql server default: I made a select to see if the default values of the default were entered but you can see in the image that this did not happen. When does it enter these default values? I foun...
asked by 15.03.2016 / 06:23
2
answers

How to get the number of records in a DataReader?

I'm doing a query in a database, however I need to know how many records I'll get from this query, before I even start the loop.    Note: I do not want to put a counter inside the mesh, I need the value   before * cmd = New OleDbCommand(sq...
asked by 09.03.2016 / 15:43
1
answer

SQL query returns [duplicate]

I have a table for the query to send the information there, and " " appears instead of letters with accents. In html I'm already using <meta charset="UTF-8"> missing something? This is the first time this has happened to me.     
asked by 24.04.2016 / 17:27
3
answers

SQL - Query on a single table with null values

Hello, I need to do a filtered query by date. The problem is that dates that do not exist in the table need to be returned by the query, having all other fields as Nulls. SELECT Data, Servico FROM controle_equipe WHERE ((Data >= #4/1/201...
asked by 03.05.2016 / 01:59
1
answer

php function filter pdo

I have a php function that returns me in a table all html NrPlaca but I would need a filter in the php function to show in the table only the DsTpVeiculo > are bitruck, I would like some tips on how to do it. Next image of the database:...
asked by 07.01.2016 / 12:47
2
answers

Display user messages

I have two tables, one of utilizadores where I save username and id , and I have another chat where I save the sender and reciever fields, which are the id's from whom you have received and sent a message...
asked by 22.01.2016 / 13:33
1
answer

how to make an inner join getting the description

My tables: agencias (id, nome_agencia, ads -> FK pra tabela de baixo) ads (id, nome, agencia -> essa é FK pra tabela anterior) The problem is this: each agency will have ads no ads have a lead agency I want to make a select display...
asked by 14.12.2015 / 16:08
1
answer

How to perform statistical fashion in SQL?

Working for a telephone charging system company, all connections generated by the PBX are billed by the system and stored in a table called cadcha . cadcha ------------------------------------------ nreg | telefone | ramaldestino | teldata...
asked by 15.12.2015 / 15:18