Questions tagged as 'sql'

1
answer

Dynamic Image Gallery ASP.Net C #

I have the following code,  It loads the photos in that placeholder. ID="phPhotos" > public partial class ImovelDetalhe : System.Web.UI.Page { private ImovelBo _imovelBo; protected void Page_Load(object sender, EventAr...
asked by 17.08.2016 / 21:21
1
answer

How to get data after a 2 string separators in a select (SQL)?

I have a string where I store day, month and year, no field is required, and I separate the fields by a pipe . If you put the day only via "25", if you have placed the day and month or only the month will be respectively "25 | 12" or "| 12"....
asked by 22.08.2016 / 22:53
1
answer

FOOD TABLES (SQL SERVER) [closed]

Oops, good morning. I have a sql database, in this database there is a table for People, it is a second table for registering credentials, in a third table and made the association of the credential with the person, ie there is a Table called...
asked by 24.08.2016 / 17:15
1
answer

Run 2 querys or more

I would like to execute 2 queries in C # when the button is clicked, but I can only execute one. public static void excluireventos() { string connectionString = Conn.tank(); using (SqlConnection connection = new SqlConnection(connect...
asked by 15.11.2016 / 21:35
1
answer

SQL, subquery if null

I'm doing a query, but I did not want it to return NULL. What I have is this: select ifnull(sum(job_withdraw_qty),0) as total, ( select IFNULL(sum(job_withdraw_qty),0) from job_positions where DATE_FORMAT(job_positions.created_...
asked by 14.11.2016 / 19:01
1
answer

Search for records with Latest date using condition

I have the following query: SELECT fm.FIELDCODE, fm.BLOCK_CODE, bl.BLOCK_DESC, cat.CATEGORY_CODE, cat.CATEGORY_ABBREV, fm.FIELD_AREA, fm.PLANTATION_DATE, fm.HARVEST_END_DATE FROM FM_BLOCK bl,...
asked by 01.12.2016 / 16:29
1
answer

SP2-0552: Bind variable "19" not declared

I am using Oracle SQL Developer to terminate a project, when the database was popular, the software accused an error in the following line: INSERT INTO musica (cod_musica, data_composicao, titulo, duracao) VALUES (11111, '1993/01/01', 'Fênis',...
asked by 22.12.2016 / 20:49
1
answer

Problem with MySQL and PHP query

I have the following problem, when I use the WHERE clause I am not able to use the values being passed by parameter. As a return I get the following message: PDOStatement :: execute (): SQLSTATE [HY093]: Invalid parameter number: number...
asked by 13.06.2016 / 18:58
1
answer

How to use Cascade Delete between two tables?

I have 2 tables: products id name ... photo_products id product_id photo In PHP I will make a DELETE in the Product, and consequently I want to automatically delete ALL the photos of the deleted product,...
asked by 26.01.2017 / 02:07
1
answer

Is there any function to calculate the trend line in PL SQL?

Good morning everyone. I need a function to calculate a trend line. I have a query (part of the function): select round(sum(nvl(vl_indice, vl_meta))/12, 2) from ( SELECT SUM (vl_indice) vl_indice, SUM (vl_meta) vl_meta FROM (SELECT cd_mes...
asked by 11.05.2016 / 16:29