Questions tagged [Transact-SQL] (96)

2
answers

How to convert the string '5$' in the number?

Hey) In my table there are several fields where entries of this kind '5$', '15$', '24$'. I need to sort the data records where the string is not more than '18$'. How to convert a record in the number that you could sort of conduct?
Kiera.Huels93 asked April 18th 20 at 13:23
1
answer

How to convert query from t-sql to oracle sql?

Hello! There are two tables: Need to get a list of sellers and the number of orders that have the maximum number of goods sold. T-sql implements the query: select top(1) with ties s.Name , sum(isnull(o.Amount, 0)) as Quantity from Sellers as s inner join Orders as o on s.id = o.Salesperson_id where o.Order_date is ...
Ana_Ba asked April 18th 20 at 13:07
2
answers

How to update multiple rows in a single query in MS SQL?

Hello! There is a table with two lines: I need to update or one row or both at the same time, and in each case, the fields Lat and Lng are updated together. Written request: INSERT INTO MyGMap (id, Lat, Lng) VALUES (1,'1','2'), (2,'3','4') ON DUPLICATE KEY UPDATE id = VALUES(id), Lat=VALUES(Lat), Lng=VALUES(Eng) Gives an ...
Ashley.Macejkovic asked April 16th 20 at 11:12
1
answer

How to write a update query to retrieve data from another table in MS SQL?

Good day, there are two the database , you need to write a query to update the data when calling a stored procedure. My version of the query:UPDATE TeamMembers SET name = (SELECT [member Name команды5] FROM Bids WHERE Id_bids = @id_bids), address = (SELECT [Адрес5] FROM Bids WHERE Id_bids = @id_bids), id_position = (SELECT ...
marlene_Sawayn asked April 3rd 20 at 23:44
1
answer

How to write update query for a data set in ms sql?

Greetings, you write a stored procedure that upon confirmation of the application adds or updates the data depending on their existence. In this function you are adding team members from fields in another table . Adding works , but with the update there are problems . How do you implement multiple update . I tried using cas...
Eryn_Da asked April 3rd 20 at 18:56
2
answers

Why does not the sql query?

There is a table of applications I want to run the query which will define the id of the application status , but when you run the query nothing appears. Query:select Id_bids from Bids where Bids.Status = 'Awaiting approval'Table columns:CREATE TABLE [dbo].[Bids] ( [Id_bids] INT IDENTITY (1, 1) NOT NULL, [Username] NVARCH...
domenica88 asked April 3rd 20 at 18:43
2
answers

As for sql server to implement the spelling of Russian words?

The table is loaded the purpose of payment, such as "Beforeandfee for the shockandfine tiles without VAT". Need to get fixed "PredonBoard for the shockon theright tiles without VAT".
lia_Okunev asked April 1st 20 at 16:32
3
answers

How to make join on like?

There are 2 tables, one has ID column ID 576000, in the other table too ID code as the screen, the Central part is completely identical, is it possible to make the join? or not? how then to connect this criterion? according to this criterion
Helga_Fay asked March 31st 20 at 21:30
1
answer

SQL query to display all orders with a certain set of goods?

MS SQL server Table products and order numbers to which they relate Need a query to get only the yellow highlighted orders
samson58 asked March 31st 20 at 19:55
1
answer

How to write a complex query to a table?

There is a table with sales by day. She naturally has a huge number of rows. With this table I create PIVOT to group sales by month. Doing this is a complex query where the dynamically determined one month from the date of them are columns for PIVOT well and the result is displayed. The crux of the matter. There is a second...
Jevon.Halvorson asked March 31st 20 at 14:44