Questions tagged as 'sql-server'

2
answers

visual studio sql error

Well, I'm new to C # and then I'm seeing a few database connection tutorials that appear to me this error: ThecodeI'vedoneisallstillbasedonabasictutorialandI'llleaveithereforyoutosee using System; using System.Data.SqlClient; using System....
asked by 13.07.2015 / 12:17
3
answers

Select last records sorted by 1 field

I have the following table structure The goal is to get the last 3 oldest records (oldest date) sorted by Name. I'm currently using subselect: Select * from (Select top 3 from TB order by Data desc) A order by Nome Are there an...
asked by 24.06.2015 / 13:57
3
answers

Remove last number with sql

I would like to remove the last number or 1 in this sequence: 0495747500000049908275289000100040000000041 How do I do in sql server?     
asked by 04.09.2018 / 22:42
2
answers

What is a DataSet and what is its function?

Creating my first applications with a database (SQL Server), I make the connection by passing my string and using the SQLCommand class to pass the query. But by searching other sites, I see that access to the database is done via DataSet....
asked by 16.03.2018 / 18:47
2
answers

Inner Join - SQL Server

Folks, I need somebody's help to understand the mistake you're making. I have two tables as shown in the code, and in one of the tables the "CodePlane" column has information. I need to put the codes related to the Beneficiaries. But it is giv...
asked by 22.02.2018 / 15:54
2
answers

Syntax error in SELECT WHERE using ADO.Net parameters [closed]

Does anyone understand this error and get a solution? Code:OleDbConnectionConSelect=newOleDbConnection();ConSelect.ConnectionString=Properties.Settings.Default.dbInvoice;ConSelect.Open();OleDbCommandCmmSelect=newOleDbCommand();CmmSelect.Comm...
asked by 29.08.2016 / 18:09
2
answers

How to convert Float to String using LINQ to entity?

How to convert Float to String using LINQ to entity? I need to convert a field from my database that has the float type to the string type in my C # using LINQ. Try using Convert.ToString, ChaveArquivo = Convert.ToString(n.scanIma.I...
asked by 22.09.2016 / 15:20
4
answers

Query to get a word after a certain character

Good morning, I need a way to get all the rest of a string after a given character, for example, I have the following database Ineedtoalwaysfetchtheremainderofthestringafterthelast"" ", ie for the first line I needed to get all " System access...
asked by 09.11.2015 / 14:24
3
answers

Export query in SQL Server to CSV file

I need to somehow export the result of my SQL query to a CSV file. However, it has to be directly via SQL or VBS. Or, you can export all the data from the database table to CSV.     
asked by 04.04.2017 / 12:37
1
answer

Assemble an ALTER TABLE script

I have this select that returns me the name of the tables that interest me: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME LIKE '%_AUD' AND COLUMN_NAME = 'REVTYPE' GROUP BY TABLE_NAME; From this result I would like to pu...
asked by 11.04.2018 / 18:31