Questions tagged as 'sql'

1
answer

Replace SQL SERVER between columns

How to do a replace between columns in SQL SERVER. For example, given the table below: COLUNA_A | COLUNA B | COLUNA_C A 123 casa I tried to run the query: SELECT REPLACE(COLUNA_C, COLUNA_A, COLUNA_B ) FROM TABELA To try...
asked by 09.12.2018 / 14:24
1
answer

Convert all mysql bank to lowercase

Is it possible to convert all columns of tables in a mysql database to lowercase letters? I have several records and several tables, all of them are a miscellaneous case (and some with emphasis). Detail: the type is InnoDB ; collation...
asked by 04.10.2018 / 00:12
1
answer

Check if sites are working, php

Hi, I'm trying to check several links, check if they are working, I'm using the code below for this, but it only works when I test locally on my pc server, when I upload it to the hosting server it does not work properly . On the hosting server t...
asked by 27.09.2018 / 22:14
1
answer

LIKE with PDO explode [duplicate]

Good evening consecrated, I have a search page, in which I want when someone searches for something like "i3 memory cabinet display" to appear all the items available in the table with respect to these items searched, so I should use the explo...
asked by 11.10.2018 / 02:44
1
answer

Double INSERT in stored procedure

Currently what I basically have is this: CREATE PROCEDURE 'Teste'( IN '@valorX' INT, IN '@valorY' INT ) NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER INSERT INTO tabelaX(colunaX) VALUES (@valorX) INSERT INTO tabelaY(colunaY) VA...
asked by 24.10.2018 / 15:14
2
answers

"Illegal string offset" error when calling usort in bank data

I am trying to sort the result by a specific column of an array of bank data. function cmp($a, $b) { return strcmp($a['usu_codigo'], $b['usu_codigo']); }; usort($usu_info_coluna, "cmp"); Giving var_dump to $usu_info_Coluna...
asked by 25.10.2018 / 14:54
2
answers

Search for unformatted sqlserver data with select

I have a field in the table Clientes with name CPFCNPJ but its data is formatted with points and hyphens and would like to do a SELECT in> formatting this data without punctuation. Is it possible to perform this type of sea...
asked by 06.09.2018 / 06:42
1
answer

SQL rule to filter only one month in TIMESTAMP field

Hello. I have a stock drive in month 1, month 2, month 3, month 4, month 5 ... how do I create the rule for only the stock movements to appear in month 3? Remember that the field is TIMESTAMP.     
asked by 05.10.2018 / 12:40
1
answer

View most current record sql server 2008

I am trying to fetch only the last record (last sale) from each client and I am not succeeding. I've tried it in many ways, but nothing .. Just returns all sales from the date. Follow my query. Thanks for the help. use banco select m.cli_forn,...
asked by 19.09.2018 / 21:45
1
answer

View with two or more unbound tables, with different columns and that need to be merged

I have two tables, "PRIMEIRATABELA" with the fields name, surname, and age, another table "SEGUNDATABELA" with the fields name, last_name, and age both tables has no link but need to join in a view being for example PRIMEIRATABELA.name and SEGUN...
asked by 20.09.2018 / 14:25