I have a table for my game called monsterClass. It’s a pretty simple table with these columns: And here’s sample data: etc Well, foolish me was quickly trying to update a certain set of monsters, a mix of monsters with various names, with a new monsterMapYear (7000). I did set the needed set of monsters to the have a monsterMapYear
Tag: sql-server-2012
How to save SQL query analytics in the background while still delivering records to user?
I am interested in knowing if there is an efficient way to record the analytics from a SQL query while still providing the records to the requester? I’m currently on MS SQL Server 2012. Let’s say for …
How to validate dates are in the format of YYYYMMDD
I have a date column having thousands of rows in the format of YYYYMMDD. I have to validate that all the rows are in the correct date format. If there is any row off from the desired format or in any means (say null) the row should be returned in the result. I have the following sample data: Since NAN
Stored procedure runs correctly only sometimes
My problem is: I have a stored procedure that only sometimes runs correctly, sometimes it does not run at all and sometimes partially (some rows where inserted in the table bot not all). I use lazarus …
Reading 0.5 value in ROW_NUMBER() and PARTITION BY | SQL Server 2012
I have this question before Looping between 2 case parameters (Date Range and Row Count) | SQL Server 2012 , now I’m thinking about a scenario, what if the value has a 0.5? or .5? Will this work using …
Condition on SQL Server query
The below SQL query is in a SQL Server 2017. I want when the value of UtenteCliente.CostoFatturazionePersonalizzato is 0 or null is configured with the value of Utente.CostoFatturazione, to do this I use the query below but the result always returns null. How can I do this? SQL Query: Answer You can use CASE expression instead IIF():
SQL concatenate columns into string and only pull address
I have 4 fields that are address fields, but the address fields can be blank and have a persons name within one of the 4 fields. The name is usually before the start of the address. What I need to do is remove and names and empty string and only pull the core address or column that starts with a
Moving Data from SQL Server to Excel, Views or Query?
I have an Excel spreadsheet that pulls data from a view (that’s pulling from another view) in SQL Server, this was created by someone other than myself. Due to recent changes in how we are storing data in SQL Server, the views no longer actively reflect the data needed. The current Excel spreadsheet use a command to simply pull the
Joining two different tables with a common third table on a common column
Here are the tables Table: Status ID, StatusDesc 1, New 2, Active 3, Cancelled 4, Complete Table: Order (foreign key relationship with Status table above) ID, OrderNumber, StatusID 1, 1001 , …
SQL Grand Total row from Multi table Select Query
I have been able to use the below SQL query to give me 4 rows of data SELECT ‘Sales Order ‘ as Type, Format(Sum(T1.C_NetAmountLessDiscount), ‘#.00’) As NetAmount, Format(Sum(T1.C_MarginAmount), ‘#….