Questions tagged as 'sql'

2
answers

Give TRUE value to the first record

I want to sort a table by 2 fields: Producto-Precio 1-100 2-25 2-27 1-23 3-45 I make a select order by by Product and price but now what I want is to add a field to larger ones and let the table look like this: Product-Price-Result 1-23-T...
asked by 18.04.2017 / 16:40
1
answer

Redirect to a Port in Domain

What friends my question is I have a web portal with example address: www.miportal.com but I need to access a system but it is entered through port 81 sistemaxy.miportal.com:81 how can I do that? Thank you in advance for your help.     
asked by 02.03.2018 / 18:35
1
answer

What is the regex that the boostrap datatable uses by default?

I would like to know which is the regex that the search box uses in the boostrap datatable, which is by default when we assign it to our table, since I would like to replicate it in a query that will obtain that same information from the table a...
asked by 25.10.2018 / 18:20
1
answer

What is the SQL server that has the option of Email from service?

I have a Db with many emails I want to use the SQL server to send publicity mail to all the registered ones The problem is that my SQL server is 2008R2 but I think it is the express or something like that it does not have the options of Mail in...
asked by 21.10.2018 / 17:15
1
answer

How can I select the last 3 IDs from SQL with PHP?

I am creating a kind of portal with news which is divided and the container, which is where the news is stored and the last 3 are displayed. I have this code, which shows me from id 3 to 1 but I am looking for see only the last 3, can you explai...
asked by 23.08.2017 / 12:20
1
answer

# 1054 - Unknown column 'PHOTO' in 'order clause'

I have an .sql file that I import into phpmyadmin. I load all the tables correctly, but when I click on the "vehicles" table it tells me the following message: # 1054 - Unknown column 'PHOTO' in 'order clause'. I do not have in any table the PHO...
asked by 28.11.2016 / 21:11
1
answer

PL SQL statement error

I have to make an insert in SQL Server. I have tried the following, but I do not know if it will be fine, at first glance it gives me a fault near the IF and the THEN , but I do not know why. I imagine it will be for the AND...
asked by 11.04.2017 / 07:36
1
answer

Unify 2 records in 1 - SQL SERVER 2014 [closed]

Good morning, I have 2 records that are almost identical, where they only differ in 1 column. What I would need to do is have a single record with the fields that differ. In the image what I have (The two registers above) and what I nee...
asked by 02.01.2018 / 16:12
1
answer

count dates of a week sql server

good day what I want is to ask a question that you tell me last week has example 15 applications starting from Monday to Friday and next or down example 10 requests of the week ancestor so on but all in one consultation. I hope you can help me,...
asked by 05.12.2018 / 14:52
2
answers

How to make a query to group by ranges?

I need to group by ranges this is the result where I want to arrive The query I am using is the following: SELECT org_account, COUNT(RESULT) AS TOTAL_MT FROM TABLE WHERE FECHA = '02/12/2018' AND mt_msc_addr IS NOT NULL GROUP BY org...
asked by 03.12.2018 / 15:39