Questions tagged as 'sql'

2
answers

SQL Server - Change information in a text field (REPLACE does not work)

Helloeveryone.IhaveatablewithaTEXTfield.IneedtochangeaninformationwithinthistextfieldbutIcannotdoit.TheREPLACEfunctionworksinavarcharfield,butdoesnotworkwithinthetextfield.Forexample:Ihavearecordwherethisfieldcontainsthefollowinginformation:"IN...
asked by 09.01.2018 / 10:03
2
answers

Query SQL Server - Union

asked by 08.01.2018 / 14:27
1
answer

Doubt - SQL Server 2012 Query

Galera, in the query below to want to place a condition inside the where that only brings the tasks that they have with maturity two months after the opening date. For example. Task 11111 was opened on 11/01/2017 and has expiration on 01-01-2018...
asked by 21.12.2017 / 15:22
1
answer

Store a query attribute in a variable

I have the following query: <?php define("DATABASE_MS_DB_98", "Cont98"); $conninfo98 = array("Database" => DATABASE_MS_DB_98, "UID" => USER_MS_DB, "PWD" => PASS_MS_DB, "CharacterSet" => 'UTF-8'); $conexao98 = sql...
asked by 15.12.2017 / 16:58
1
answer

Optimize module 10 SQL Server

I have a database created in approx. a decade, this same bank has several records and obviously, being in production, can not be changed from day to night. The problem is:    The products registered in the bank have serial, these serial at...
asked by 04.12.2017 / 19:18
2
answers

How to use pseudo names with CONCAT and MySQL?

A question about MySQL asks for the output to come out in that response format. When I finish my solution through a query in MySQL , I encounter the following problem. Below is a first example solution of my query that Works...
asked by 02.12.2017 / 20:53
1
answer

Create a filter of 90 days before a period

I need you to bring results that have completed 90 days within an informed period. For example, I have the possibility to do: DT_INICIO_REAL <= (sysdate-90) , will result in 90 days from the current date or DT_INICIO_REAL BE...
asked by 30.10.2017 / 16:34
1
answer

How to create a Foreign key and unique attribute at the same time?

I wonder if there is any way, or how best, to restrict a relationship between two entities, one of which can not be repeated in this relationship. I have the 'Customers' and 'Telephone' tables. But 1 customer can have several phones, so I made a...
asked by 30.10.2017 / 02:52
1
answer

How to bring information from the database and insert into a table (bootstrap)

Good afternoon! I have tried to bring information from the database 'user' and insert it into a table that follows the bootstrap syntax. But because of the complexity of tags I end up wrapping myself around: (    The goal is: > Select a tea...
asked by 28.12.2017 / 22:17
2
answers

ISNULL in a Case When

I am doing a select using CASE WHEN in Sql Server, so it is done checking the existence of a record, if it exists, it makes select in a table, otherwise it makes select in another table, however, the two can return null. Something like th...
asked by 24.10.2017 / 21:21