Partition table or create separate tables
SQLTeam Forum
by yosiasz
6h ago
Greetings Which approach would lend to better performance? creating table partitions or create tables by type? Thanks 4 posts - 3 participants Read full topic ..read more
Visit website
Remove trailing zeroes from the middle of a string
SQLTeam Forum
by littlewing1977
6h ago
I have only been working with SQL for a few months. I am trying to strip trailing zeroes from a version number in the middle of a string. For example, I have a record that shows "7-zip 19.00 (x64 Edition)" I need to make a column that shows it as "7-zip 19 (x64 Edition)" I wouldn't normally manipulate this data, but I'm working with some terrible data from the start. For clarification, I am not trying to make changes to the stored data. I just need to show a new column in my query. Thanks 2 posts - 2 participants Read full topic ..read more
Visit website
Sending messages on table rows updates/inserts/deletes to RabbitMQ from SQL Server
SQLTeam Forum
by ambarray
14h ago
We have a requirement here. Whenever certain rows in a table are inserted, updated or deleted, we need to send messages to a message broker for further processing. Currently we are using triggers and SQL Server Service Broker for this purpose. But we want to use RabbitMQ for scalability and wider reach. Is there a third party solution component available to meet our requirements. We are ready to implement ourselves if 3rd party component is not available. 2 posts - 2 participants Read full topic ..read more
Visit website
Semi Join Query - Emmanuel Katto
SQLTeam Forum
by emmanuelkatto
2d ago
Hi, I am Emmanuel Katto from UK. I want to ask in which scenarios we need to use semi join? Thanks! Emmanuel 3 posts - 3 participants Read full topic ..read more
Visit website
Sql query to to read each friday ang count back 6 days
SQLTeam Forum
by Ang
2d ago
(topic deleted by author) 1 post - 1 participant Read full topic ..read more
Visit website
GIve me record base on a If statement
SQLTeam Forum
by JG805
2d ago
I need help with an SQL query to give me records based on two columns in a table that Where if Column B is 10% of Column A give me all records. Column A -------Column B 114------------------- 96 114-------------------103 114------------------- 14 43------------------- 39 112------------------- 99 5 posts - 3 participants Read full topic ..read more
Visit website
Format Calculated column as currency
SQLTeam Forum
by charliedurnin
2d ago
How would I format the following do that line 5 ,SalesLT.Product.ListPrice - SalesLT.Product.StandardCost AS Profit Is formatted with an £ sign? The code is SELECT SalesLT.Product.Name ,SalesLT.Product.Color ,SalesLT.Product.StandardCost ,SalesLT.Product.ListPrice ,SalesLT.Product.ListPrice - SalesLT.Product.StandardCost AS Profit ,SalesLT.ProductModel.Name AS SubCatNameType ,SalesLT.Product.ListPrice ,SalesLT.Product.Name AS SubCatName FROM SalesLT.Product INNER JOIN SalesLT.ProductModel ON SalesLT.ProductModel.ProductModelID = SalesLT.ProductModel.ProductModelID Many thanks 3 post ..read more
Visit website
T SQL for closest dates
SQLTeam Forum
by sreenu9f
3d ago
HI, I need help Sql table like below with different Insert and Delete in a column for a given Account with response column being dates. I would like to get the result with Insert and Delete in two columns such that insert date and delete dates are closest like output desired section. Any help is greatly appreciated. Thanks, VisitID QueryID Response PA10004252470 Insert 20240219 PA10004252970 Delete 20240212 PA10004252970 Delete 20240215 PA10004252970 Insert 20240211 PA10004252970 Insert 20240214 required Output VisitID Insert Delete PA10004252970 20240211 20240212 PA10004252970 20240214 202402 ..read more
Visit website
Wildcard In A Date Field?
SQLTeam Forum
by taunt
3d ago
So I'm trying to see what is in our system with a 12/31 release date. I try this: SELECT UPC, ReleaseDate FROM Items WHERE (ReleaseDate LIKE '????-12-31') But that doesn't return anything. If I change the date to Halloween 10-31 it still finds nothing, but I know we have things in our system with that release date. So where am I botching it up? Thanks 2 posts - 2 participants Read full topic ..read more
Visit website
Select Top 1 from a nested CTE
SQLTeam Forum
by deepdave646
4d ago
Hi, This is my first post so I hope I am not violating any Rules. I have a Common Table Expression that returns 2 Columns, the 1st one uses ROW_NUMBER and has row numbers (rn) in such a way that they Can duplicate I then use a 2nd Nested CTE with the Reference to the 1st one, but I want to retrieve only the 1st Row of the First CTE where RN = 1. Is there a way to do it? 2 posts - 2 participants Read full topic ..read more
Visit website

Follow SQLTeam Forum on FeedSpot

Continue with Google
Continue with Apple
OR