Questions tagged as 'sql'

1
answer

How to rename columns of a sql table using a query

Even if you miss an error, make the changes. The question is simple, instead of modifying the table from the designer, I want to do it from a query. I have found how to modify the type, the description ... except the name! I have tried...
asked by 07.07.2017 / 09:23
1
answer

Delete the last two characters of a sql server string

I use SQL Server 2000 and I have a table with a field rut of type VARCHAR (eg: '17045782-8' I need: '17045782') to which I have to remove the check digit and the hyphen. And I do not find it with substring(rut,0,x) since the...
asked by 24.03.2017 / 14:55
4
answers

how to connect android to mysql (external DB)?

Friends I am creating an app and I need to consult data from my host, so I have read this obsolete so far using the apache httpcient library now I must use threads, I'm not lost, any help or tutorial. first of all, Thanks!!! and eye is my first...
asked by 20.04.2016 / 18:59
1
answer

Because it does not give the sum of names in MySQL

I have the following: CREATE Table apellidos_completo (Completo varchar (255)) INSERT INTO apellidos_completo (Completo )values ('alvarez') UPDATE apellidos_completo set Completo = 'Rodriguez' + Completo I do SELECT SELECT * FROM apel...
asked by 30.06.2018 / 05:02
2
answers

Get the largest data from different fields - SQL

I have a table with 'STOCK_TIENDA1'-' STOCK_TIENDA2 'AND' STOCK_TIENDA3 ', I need to take the stock of the store that has the most value and pass it to a new variable 'SHOP_MAYOR' would be something like this: I thought of something lik...
asked by 28.06.2018 / 21:35
2
answers

Validation of PHP fields

I already have my index in which I log in with username and password, the question is that when giving blank space in both fields allows entering the menu, some sentence in script or php to validate and prevent this happen? form code: <c...
asked by 19.04.2018 / 17:40
2
answers

delete repeated values sql server

I have a problem in a sql server query ... I have this table where I need to delete repeated values (those marked in blue) due to the last column ('hh''mm') and try the DISTINCT but even so he shows them to me I do not know if I made my...
asked by 26.10.2018 / 20:46
1
answer

Get a record that is only once in the SQL table

I honestly do not know how to get the records that are only once from a table. for example I have the following table: identificacion atestado 1111 a 1111 b 2222 a 2222 b 3333 a 4444...
asked by 22.10.2018 / 17:29
1
answer

ERROR insert JDBC data MYSQL Java

I've been trying to insert all the data I get through the scanner into the database all day yesterday and I get an error, I can not find the solution anywhere. I get this error message:    Exception in thread "main"   com.mysql.jdbc.except...
asked by 21.03.2018 / 13:07
3
answers

Validation, Filter results in SQL

Good morning, I have a query that returns values of several functions and I need to filter it with another table B since I do not want it to show the record if it exists in table B This is the query I want to filter SELECT FormaPago, NDCH, CO...
asked by 24.11.2016 / 16:09