I have very old backup file (.bak) of SQL Server 2000. After restoring it to SQL Server 2005, the database looks empty (please see screenshot). What ...
I have very old backup file (.bak) of SQL Server 2000. After restoring it to SQL Server 2005, the database looks empty (please see screenshot). What ...
I only got customer names but i need order columns also. i want solution in subquery ord_no purh_amt ord_date cust ...
Below is my CTE Example It's just a example my actual query is different here in above example A,B & C stands for count which I get from 3 diff ...
From the input data, I need to rank the id. The data is order by time ascending. Example: id number 421492036 has two record with code '05' and is ...
The engineers uses this Access based app that takes data from SQL Server 2005. The users download a file containing details of parts etc make amendme ...
I have the two tables pictured from a "city jail' DB, one is the sentences given to criminals and the other criminal information. I am trying to wri ...
I want all the MAFN column values that were added to the table in the last hour(:mm). The column ReturnDt stores the time it was added in DateTime for ...
I know, I know. It's not supposed to be this way. Big picture, I'm working with map data and trying to determine which street a bus stop is closest t ...
I need output like below Balance Qty [Allocate Stock Qty] Shortage [Stock] Running Stock 5. ...
I want to allocate BalanceQty first from StockQty and when StockQty is finished then from WIPQty This is working fine (below is just sake of unders ...
I am trying to combine two columns into two rows. I am unbale to work it out with the PIVOT table. My table looks like this name | status | timestamp ...
INPUT: A pizza company is taking orders from customers and each pizza order is added to their database as a separate order each order has an associ ...
I have this table and I'm trying to determine how many Tables (in a restaurant) are awaiting food. The table( in the database) has the following colum ...
I have a dataset that has two date columns for each transaction. An invoice date and a charge date. I am trying to do a cumulative or running total of ...
Say i have this table Product Version Value 1 1 1000 2 1 2000 ...
I am trying to get record with Max(StartDate) for each MeterNumber and then try to get records where startdate, enddate & RateCode is different fo ...
I have the following tables: customer: id customer_number company firstname lastname account_manager_emai ...
I want to convert 97200 seconds to HH:MM:SS format. I have used the below SQL Server syntax but it works as long as hours are less than 24 hours it ...
I have 2 machines, one that have an SQL Server with all the data in it, and another one that has the client dashboard. Both machines are not physical ...
I have a table where one of the columns has a sql_variant datatype. I'm trying to modify the column to VarChar(800) but I'm getting an error: Impl ...