Questions tagged as 'sql'

1
answer

Modeling comments

I'm creating a comment structure similar to the # / p> NOTE: I'm calling in question and answer comments since it's basically this way that the Free Market model works. In red questions and green answers. There is only one le...
asked by 22.09.2015 / 14:59
2
answers

How to generate a statement per month in the database?

I have to generate an extract in the database that is similar to the bank statement and present the cumulative balance. I have the following columns Data, Debito, Crédito. Data entry is daily but the statement I need is per month. 01/...
asked by 06.09.2015 / 00:58
2
answers

Doubts LEFT JOIN SQL

I need to do a query, where I enter a person code and sql returns all the people who are inside that group who is the person I typed the code to. Example: I enter code '1', The code refers to the person code, this person is in a 'A' class, bu...
asked by 09.09.2015 / 15:02
2
answers

What jQuery event do I use to query the database?

jQuery(function($){ // Chamando as funções $('#busca-cidades').keyup(function(){ ... I am doing a query in the database and returning this query formatted with html / css and the query is in WordPress SQL. So far nothing very differen...
asked by 13.07.2015 / 00:25
1
answer

How to change a SQL Server View

I have some Views on SQl Server that have been implemented by other people, but they have not left any documentation and scripts, I believe it is possible to access to change and maintain them? But I do not know how to do that. Note: The view wi...
asked by 29.07.2015 / 16:02
2
answers

Get start date and end date of a week of the month

Good afternoon, guys. Today I have a problem getting the start date and end date for a week of the month. Let's break it down: I have a combo that brings me the weeks of a month posted. To know how many weeks I have in January 2015, for ex...
asked by 20.07.2015 / 20:14
2
answers

Return columns that accept boolean in a table

I need a query that brings the names of the columns in a table that accept boolean . Ex: In the clientes table, I have the fields casapropria (1 for yes, 0 for no), temfilhos (1 for yes, 0 for no).     
asked by 16.07.2015 / 16:13
1
answer

How do I add a new column between 2 columns in PostgreSQL?

How do I add a new column between two columns already in my database in PostgreSQL? In MySQL do I use the AFTER function to add one column after another, and in PostgreSQL? How do I do this? SQL ALTER TABLE nota ADD hota_utc VAR...
asked by 15.07.2015 / 21:08
1
answer

Return of the ajax function with result of a sql search

I'm making a section on my site, which has a select field. When I select something in this select , I want to perform a search on the DB, returning information about that selected item to use that information elsewhere in the site....
asked by 29.09.2015 / 21:04
1
answer

Date Range VARCHAR / DATE

I have a date field of type (type VARCHAR ) in my table, and I recently had to search the database with date range. And for this I used the Between operator, getting something like: BETWEEN 15/08/2015 AND 25/08/2015 . So go...
asked by 27.09.2015 / 01:30