Questions tagged as 'sql'

1
answer

Help with a query in linq

I want to make a classification so to speak of a list that I have, I'm trying to do it with linq. well this is what I want .. Result. This the information with which I count. Proveedor: Videmont Cap. Morgan = $450.12 ET. Negra = $620.32 P...
asked by 27.06.2018 / 01:42
1
answer

Error when consulting with INNER JOIN

Everything works ok less when I pass the user id with the variable $ user_id. It just fails me with the inner join, giving me the following error,    Catchable fatal error: Object of class User could not be converted to string in Crud...
asked by 17.04.2018 / 13:29
1
answer

Number records of a query in MySQL (alternative to variables defined by the user)

Inside the MySQL database manager I have a table of which I do a% general% co_ and I want to list with an incremental number all records, I can do it originally with a user defined variable as follows : SET @counter = 0; SELECT (@counter := @...
asked by 20.09.2018 / 17:36
1
answer

List all the databases of a server in SQL Server 2008

I try to get a small report of SQL Server 2008. I need to list all the databases created on the server, and include: Name creation date user (the one with db_owner permissions) and size The sp_helpdb gives me certain infor...
asked by 20.04.2017 / 20:55
1
answer

Consult MySQL with OR and AND clauses?

I want to list the products that are in two lines and also filter by the description, the table has the following structure: CREATE TABLE productos ( IMA_ARTICULO DOUBLE ,IMA_DESCRIPCION VARCHAR(100) ,IMA_LINEA DOUBLE ,IMA_IMPU...
asked by 11.10.2017 / 23:08
1
answer

How to manipulate a column with a name used by querys in SQL?

I have a table in SQL server with the name default , but the problem is that SQL uses the word 'default' to do something else. Then I can not manipulate the default column of my table. In what way can I do it? I can not edit the name of the v...
asked by 28.11.2018 / 14:53
1
answer

Group by week - day that starts the week

The scenario is that I have some events a day, and I have to group them per week, in such a way that they can be agurped such that: SELECT array_agg(a_day) as data, week FROM ( SELECT day::date as a_day, date_trunc('week', day) :: date...
asked by 29.11.2018 / 14:25
1
answer

Error in php and sql by odbc connection

I have the following code. The moment I run in the browser it tells me the only error:    odbc_exec () expects parameter 1 to be resource, string given in C: \ AppServ \ www \ central \ index.php on line 64 line 64 is as follows: $resul...
asked by 10.05.2018 / 23:39
1
answer

IF nested in TRIGGER SQL

I must make a trigger that does not allow to alter tables that are registered within a specific table. For this, what I was thinking is to make an IF that asks if the name of the base, the schema and the name of the table are housed in that t...
asked by 03.08.2016 / 02:45
2
answers

Image Change name on server - PHP

Updated: Someone who can help me with this code friends, I have to save an image in server and database. The problem is that it saves the image on the server, but the insert query that I have is not executed. //*-----------------------------...
asked by 05.01.2016 / 16:36