Questions tagged as 'sql'

1
answer

How to save in bd, the coordinates that I am showing in a div.innerHTML?

Good, I'm new to the community. My problem is the following, I need to save the coordinates (latitude and longitude) in my database when the person makes a record in my Web Application . Before making the new entry the user agrees to share thei...
asked by 12.10.2017 / 22:35
0
answers

Doubt about host [closed]

How about, I tell you, I am a junior programmer in Android and iOS systems I am developing an application and web which requires a lot of data flow and storage. To give an idea, it is intended to be an application and web similar to eBay or OLX....
asked by 13.10.2017 / 22:51
1
answer

Bring all the data of a table in mysql

I have the following query: SELECT pr_production_units_details.id AS idProductionUnit, pr_production_units_details.production_units_detail AS productionUnit, pr_varieties.variety FROM (SELECT MAX(sw_sowing.id) AS id FROM sw_sowin...
asked by 17.10.2017 / 22:59
2
answers

How to perform a split in SQL server 2008 r2?

Hi, I wanted to know if it is possible to carry out a split as shown below, since I need to receive a string of words separated by commas; So far I have not been served by the methods I have seen on the internet. SELECT * FROM BASE WHERE Doc i...
asked by 24.11.2016 / 16:00
1
answer

Get the largest amount and its id in sql

I have three records and I want to affect the highest amount I get with the MAX (Quantity). to make a subtraction to the greater amount. but it affects the three records that I have. I take care to bring the last amount also get its id to affect...
asked by 02.10.2017 / 21:06
0
answers

error # 1005 - Can not create table (errno: 150)

I try to create a table that refers to a foreign key that I created earlier, the statement of my instruction goes like this: create table IF NOT EXISTS opcion( id_opcion varchar(21) not null, id_pregunta varchar (21)not null, prima...
asked by 05.10.2017 / 17:00
1
answer

Replicate database taking into account possible changes in the source BD

Good day, I need to "replicate" some fields of some a database, the problem is that I must contemplate the fact that some data in the source DB are modified to update those in the new DB and not generate a new record. In my first load of data, I...
asked by 13.11.2017 / 17:13
1
answer

Help with a SQL Query

In a SQL database, I have a part reference table with quantities, stock locations and stock entry date. I need to ask about to know what stock locations to get a certain number of pieces. Prioritize about locations that have the oldest entry dat...
asked by 15.11.2017 / 16:14
1
answer

See left join with 6 tables

I have 6 survey tables, form_alumnos, dimension, questions, answer_type, answer. Table form_alumnos and I have this query SELECT p.id_pregunta, tr.tipo, COUNT(r.id_respuesta) as cantidad_respuestas FROM encues...
asked by 15.11.2017 / 22:10
1
answer

Problem with pivot SQL server 2008 r2

Good people, I have not touched much the issue of sql, at least to do what a client has asked me, you need to create a view where you see a single line with the days of a month that you enter a user of your application and show certain data....
asked by 14.11.2017 / 17:37