Questions tagged as 'select'

2
answers

Count how many fields are blank in a MYSQL row

I have a registration table with 53 columns (address, phone, etc.). I wanted to set up a query that would bring me how many of these columns are empty or NULL, how can I do this?     
asked by 11.10.2018 / 19:49
1
answer

How to mount SELECT in lambda C #?

Recently I asked for help to assemble a SELECT to bring the price of the products How to mount SELECT They gave me this solution that worked perfectly: SELECT P.PROCODIGO, P.PRONOME, H.HISPRECO FROM PRODUTO P INNER JOIN HISTORICO H ON...
asked by 16.02.2016 / 20:18
2
answers

I need a new random number for each line in a sql query (server)

I use the sql server . I need to use a random number in several different columns (the same random number) but I want a new random number on each line ... For example, let's assume that TABELAX has only 5 rows and I'll query the genre ......
asked by 16.11.2016 / 11:43
2
answers

Clone select jquery / javascript

I'm a beginner, and I'm having trouble running this code I used from another topic from here ( Add and Remove fields with Javascript ). Here he did not run, but in my localhost he even clones the requested snippet but does not just show sele...
asked by 21.09.2017 / 22:11
1
answer

Procedure oracle to copy data between tables

I need to do a procedure that copies from my table TAB_FORNECEDOR, everything in it and go to table TAB_FORNECEDOR2. I need to make a cursor with a loop, a delete with commit first of all, can you give me a light on how to mount my procedure?...
asked by 16.12.2014 / 18:52
2
answers

Paste mysql field dynamically

I created a select command based on information sent by the user, eg: $anoini = $_GET['anoini']; //variavel com ano escolhido pelo usuário $anofim = 2016; //ano final é 2016 $s = 'SELECT pa_proc_id, procedimento, '; //inicio da query while ($...
asked by 04.11.2016 / 19:39
1
answer

How to customize a Select in columns?

Personal I have a select that shows CODE | TITLE | DESCRIPTION | UF 0001 | TESTE1 | NEW ITEM 1 | SP 0002 | TESTE2 | NEW ITEM ADD 2 | SC
asked by 01.05.2016 / 23:35
1
answer

How to list a sample of all tables in a MySQL database?

I need to sample all the tables in a MySQL database, for example through SELECT * ... LIMIT 10 . I already have the code that returns all the tables in the current database: select table_name from information_schema.tables where table...
asked by 26.09.2014 / 19:08
1
answer

SELECT Mysql - Prioritizing result that is not null

Hello, I have a table with multiple records, which are not required. I need to run a query, and only bring the result that has more information that is not null. Ex: ID | Col-A | Col-B | Col-C | Col-D ----------------------------------...
asked by 21.05.2018 / 01:32
2
answers

Calculation of Latitude and Longitude - Approximation

I'm having a hard time ... Currently I have the data Latitude and Longitude of company records in my database, with this I need to bring data close to me, in case I would have latitude and longitude of my position, for example, to bring compa...
asked by 08.07.2016 / 14:48