Questions tagged as 'sql'

0
answers

Message 8115, Level 16, State 5 - Arithmetic overflow error converting numeric to varchar data type

I can not find what's wrong with these conversions: INSERT INTO @RESULTADO SELECT @DATA_REF as data_ref, @EMPRESA as empresa,...
asked by 26.07.2018 / 14:36
0
answers

Using SQL Database without external programs [duplicate]

Is there any way to make an application, install a database on a person's computer, and on that computer use a database without using SQL server or anything of the sort, requiring only the application to update, delete and enter new data?    ...
asked by 21.07.2018 / 16:51
1
answer

How to make a request and search for a string

I would like to know how to give a request and look for a string, for example: * www.site.com / index.php? id = '(SQL Error) (look for or error)
asked by 08.08.2018 / 23:01
1
answer

Sending emails belonging to a group

I need a help, I'm developing a mailing system that allows sending to a group of emails belonging to a group, I was able to do a part now, my field txt_to receive the name of any group and within this group, I need to make my ASP read the emails...
asked by 27.07.2018 / 18:13
0
answers

How do I make a query to return an array of stdClass objects containing the author name, sum of visits and sum of views?

I'm developing an author traffic plugin for a news site and I'm catching up on some queries. I have the following widgets that are shown in the admin dashboard: function ws_general_statistics(){ global $wpdb; $pageviews = $wpdb->ge...
asked by 19.07.2018 / 06:47
2
answers

How do I get the last values entered from two tables, and sorts them by the last access?

I need to create a select that takes the id's from two tables, unite them and show me the last record of the two together. I tried this way: SELECT DISTINCT p.cod_mobilibus, p.nome, q.dt_acesso FROM pr_pontos p RIGHT JOIN pr_qr_pontos q ON p.c...
asked by 23.07.2018 / 23:02
1
answer

SQL connection with PHP

I have the following PHP, I'm using WAMP, and as in the image below, the dll's are active: <?php$server="dblinx"; $connection = array("Database"=>"Linx", "UID"=>"root","PWD"=>"root"); $conn = sqlsrv_connect($server, $connection);...
asked by 19.07.2018 / 20:01
1
answer

Convert to decimal without adding zeros - SQL Server

I am converting a number from varchar to decimal. This number already has the boxes after the comma, and when converted it adds two more zeros. Example: 12,345.67 --- > 1234567,00 The code I am using is this: CAST (REPLACE (REPLACE (ZMI...
asked by 11.07.2018 / 21:33
1
answer

How to add equal amount of SQL?

I have the following query: SELECT DISTINCT CTRL_CARGA_PED_VENDA.CtrlCargaNum, ITEM_PED_VENDA.PedVendaNum, PRODUTO.ProdCodEstr, PRODUTO.ProdNome, Sum(ITEM_PED_VENDA.ItPedVendaQtd) AS QtdItem FROM ITEM_PED_VENDA, CTRL_CARGA_PED_VENDA, PRODUTO...
asked by 11.07.2018 / 22:18
1
answer

Create field unique Android Studio

I am a beginner in android development and am trying to create a table in sqlite where the email value will be unique. However, the application is allowing you to register the same emails. @Override public void onCreate(SQLiteDatabase db)...
asked by 12.07.2018 / 15:33