I have two databases on the same SQL Server. One is used for production (used by the users), and the other is a test database used for testing. The testing database has the same tables and structure as those in the production database and most tables have a primar..
Tag : sql-server
I have a table where I am storing the currency and their symbols when it comes to Philippine Peso ₱
it is not storing cor..
Tackle ..
Tackle ..
I’m looking for a way to determine what user applied a CU patch to SQL S..
I am working on converting values to overpunch by joining an overpunch table to a purchases table, but for a report that sums up the purchases I am having trouble avoiding putting overpunch in the group by. Below is my current code and the overpunch table I am using. I think this could be solved with a CTE but I have not had luck with i..
I am trying to pull addresses based on their type from certain accounts. The relation between the two tables is not based off account type but rather a customerId (a customer can have many different accounts whose accounts have their own separate ID’s). The customers account have a profile number and parent profile number either of which is linked to the profile number in the address table. So, what I am trying to do is determine if the account profile number is in the address table (as fintProfileNumber) and if it is list the address if it is a mailing address, if not then check if the account parent profile number is equal to the profile number in address table (as fintProfileNumber) and list that address if it is a mailing address. If none of these are present then use the default mailing address in the account table. I have attached an example of the t..
I have a sql server and IIS service running on Window Server 2019. I wrote some API populating the data in database in the BE code which is located in the IIS site f..
need query for TAT report .. i Need total working hours only on office hours i.e, 09:00 to 06:00 if time is more that 6:00 the adjust the time to next day starts from 09:00 and also include public holidays . if there is any public holiday then time should add to next day of h..
ID Status datecol 1 closed 2024-04-18 2 closed 2024-04-12 3 closed NULL 4 closed NULL Let say Id 3 came in as closed on 2024/4/19 with datecol null, How can i populate it with the date it came in as closed(in this case: 2024/04/19). And what if id 4 was to come in five (5) ..