Questions tagged as 'sql-server'

1
answer

Return the value to the left

Good morning. A question, how can I return the results of a column containing only the left values that start with the word 'car' for example? I'm using the sql server. Thank you.     
asked by 12.06.2018 / 15:25
1
answer

Generate script with insert of tables in sql server

I use Sql Server 2012. I made a query with the title above and did not bring anything in the search. I have a BD and I need to take you somewhere else. So, the best way is to generate a script of all the existing objects in it and since I have p...
asked by 11.12.2017 / 20:02
2
answers

Query on all tables in the database

Is it possible to query all tables with the same column for their values? For example, I have the Bank named SGE , I have 230 tables in it, all these tables have the CodPRF column and I want Query to return all the results in th...
asked by 04.12.2017 / 18:50
1
answer

I have a problem loading a field using a function in ADVPL

I need to load the CK_XLOTE field by entering the product code in the CK_PRODUTO field, I am generating a function to perform this procedure, but it is not returning the batch in the field. Can anyone help me. Follow the code #INCLUDE 'PROT...
asked by 16.08.2018 / 19:58
1
answer

Is it possible to change a user-defined table type?

I created a table type to use in some procedures, and after creating the procedures, I realized that I need to change some of the types of columns. Is there any instruction to change a table type? I'm trying to avoid deleting the type and...
asked by 27.09.2017 / 22:03
2
answers

Query with join

I have a problem in the query to generate a report. I made a JOIN of the ordering table (which will get the report) with the table of customers and products. Until then everything worked, but he hardly shows all the requests, only shows the firs...
asked by 17.11.2017 / 12:58
2
answers

Case in Where using SQL Server

I have the following code that lists certain business agreements. You have the Yes or No option. DECLARE @Opcao VARCHAR(7) SET @Opcao = 'S' SELECT * FROM BLA BLA BLA WHERE ((('{Opcao}' = 'S') AND NFDataEmis BETWEEN lme.LogM...
asked by 21.06.2018 / 22:19
3
answers

Convert nvarchar field (50) into datetime table SQLSRV

I need to change a field in the SQL database table whose format is in nvarchar(50) and saved values in date format 07/09/2017 , containing NULL values too! Do I need to convert this direct field in the database to datetime...
asked by 07.09.2017 / 16:14
2
answers

Repeat previous rows when there is no record in SQL SERVER date

Friends, good afternoon! I came across a problem at work today, and I have not yet got a solution for it. As I do not have much experience in the database area I am having difficulty solving this problem, I would be very happy with a help, hi...
asked by 12.09.2017 / 22:17
1
answer

Record address by coordinates and get in google maps

I know that google makes available its api for maps. I would like to record addresses but also the coordinates, that when the user was reading these coordinates, I already showed on his screen or in his App, the map of the searched address. How...
asked by 16.11.2017 / 13:33