Questions tagged as 'sql'

3
answers

drop table with temporary table giving error

qryCIDtemp.SQL.Text := 'drop table if exists #tempCID'; //apaga a tabelas temporária Delphi returns the following message at runtime: Invalid use of keyword Token: if Line Number: 1. If anyone can help me, I'm very grateful. EDIT: T...
asked by 20.06.2018 / 18:15
1
answer

SQL Server - split function

I have the following table: The purpose is to do a function of the EixoX column in SQL Server where TipoGrafico is different from 'StockChart' >. That is, if TipoGrafico is different from 'StockChart' then I...
asked by 27.07.2018 / 11:52
2
answers

How to set SET CLIENT_ENCODING = UTF8 permanently?

I'm using PostgreSQL in my DATABASE Accented information is being recorded with accent problems. Ex: The record as à Shark records as Shark The encoding of my DATABASE and my server are using UTF8 as ENCODING . However, Post...
asked by 09.08.2018 / 16:59
1
answer

How can I make this comparison between the data in the same column?

"Create a function (named fn_bo_varios_states) that receives as a parameter the code (INTEGER) of a victim and return (TRUE or FALSE) if she has already recorded occurrence bulletins in more than one territory state Brazilian. " How can I make...
asked by 09.01.2018 / 00:39
1
answer

Equivalence between EXCEPT | INTERSECT & exists | not exists

Would it be EXCEPT | INTERSECT always equivalent to not exists | exists ? Having the following query SELECT ProductID FROM Production.Product INTERSECT SELECT ProductID FROM Production.WorkOrder I could write as fo...
asked by 01.12.2017 / 16:45
2
answers

Zeroing datetime time with SQL

Today my SELECT returns the following date: 2017-11-16 10:37:16.000 I would like to return 2017-11-16 00:00:00.000 , can you help me with this formatting?     
asked by 17.11.2017 / 19:09
1
answer

How to declare "nullable" parameters in an Oracle procedure?

I need my procedure to accept null values in some parameters of type Number. How do I do this in PL / SQL? Currently: PROCEDURE SP_EDITAR_QUADRO( P_IDQUADRO IN NUMBER, P_IDFUNC IN NUMBER, P_IDTRAB IN NUMBER ); ... I need the...
asked by 16.11.2017 / 18:43
1
answer

Use Datepart as Query Parameter

I'm developing a system and am bumping into a SQL query that consists of the user searching by Date and will have the option to choose whether the query will be done by adding Weekend to those dates, excluding the weekend or just consulting the...
asked by 22.11.2017 / 03:27
1
answer

Syntax error in Insert Mysql

I can not solve the error below: Notice: Undefined index: HTML_cor_TAREFA in C: \ Users \ User \ Desktop \ pi Fe \ Order2 \ CadastraTarefa.php on line 14 You have an error in your SQL syntax; '', '', '', '', '', '') 'at line 1 (check the...
asked by 28.11.2017 / 12:40
2
answers

Structure of tables in user question and answer template

I have a question in the structure of some tables and I hope you can clarify in detail below. Scenario The system will generate a way to create dynamic forms and questions in order to be answered by users already registered. Respons...
asked by 19.02.2018 / 01:03