Questions tagged as 'sql'

3
answers

How do I get the last date of a weekday in a given month in SQL Server?

Using the SQL Server T-SQL language, how to get, for example, the last Wednesday of the month of May in a given year?     
asked by 13.12.2013 / 17:45
2
answers

How to get the current year in ORACLE?

I need to get the annual year in ORACLE, but I just know how to get the current date, like this: SELECT SYSDATE FROM DUAL Can you manipulate this to get the Year?     
asked by 27.02.2014 / 19:27
2
answers

SQL command PARTITION BY?

I'm reading and it was not very clear the PARTITION BY command in creating tables in structured databases ( SQL ), a basic example p> CREATE TABLE employees ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(25)...
asked by 19.11.2018 / 18:36
1
answer

How to count the number of tables in MySQL?

I'm trying to count the number of tables in a MySQL database. I tried to do the following but returned a syntax error: SELECT COUNT(SHOW TABLES) How can I do this?     
asked by 05.08.2015 / 18:44
3
answers

Check if a date and time (timestamp) represents the current day

I have a table with the following field: dh_envio (TIMESTAMP) and I want to mount a query to get all the records of this table in which the dh_envio is equal to the current date (TODAY). I thought of it as follows: WHERE dh.envio BEETWEEN '...
asked by 18.02.2014 / 02:13
6
answers

Convert DATA dd / mm / yyyy hh: mm: ss to yyyy / mm / dd

I have a date in the following format 14/12/2015 00:00:00 and need to convert to 2015-12-14 how can I do this in SQL ?     
asked by 15.12.2015 / 14:04
1
answer

VBA - SQL - Filter with SELECT

I would like help with extracting information from another worksheet through SQL. The link on the worksheet where you will establish the connection and extract the information is this: Google Drive The link to the spreadsheet where the D...
asked by 17.11.2018 / 23:00
1
answer

What is the best type in SQL to use with CryptoCurrency?

I am developing a system where I will store transactions of CryptoCurrencies, type Bitcoin, I can not in any way have problems of conversion and rounding, in C # I checked and the best is decimal , right? The values will be in this forma...
asked by 08.12.2017 / 19:31
1
answer

Friendly Url in PHP and Sql

I have the following php code to make my site urls friendly: <?php $atual = (isset($_GET['pg'])) ? $_GET['pg'] : 'home'; $permissao = array('home', 'contato', 'sobre', 'politica'); $pasta = 'arquivos'; if (substr_count($atual, '/') &g...
asked by 01.02.2015 / 03:46
1
answer

Is it possible to define a connection pool for each user in an oracle database?

I searched the oracle documentation and found only ways to change the image, but nothing about creating another. Does anyone there know if it's possible what I'm ordering? And how to proceed? Thank you in advance. Att Harisson Ford A....
asked by 19.05.2016 / 17:33