I'm planning out a migration of some access tables to a SQL server database. The tables already exist in a back end file. Once the tables are moved to sql, what is the best way to go through all of th…
I have 2 tables.
1st table has shifts for everyday use for each warehouse
Sample data (this is for warehouse 1):
shift_ID | name | warehouse_id | start_time | end_time
1 | 1st | 1 | 08:00 | 15:…
Is there anyway to see which database connections (SQL Server) are opened on machine?
E.g. If I open an application and now want to see in the background which database connection it is using ma…
One of many of the great solutions I received here had to do with the use of a group by. I've been reviewing the solution every sense and wanted to ask a follow up question. Please see original questi…
In the query below, if personOne is null, I want to output personTwo as "personOne". Can someone assist? I tried using this but it does't work
Hi - I have three tables in my database. The tables are named book, mags and literature. Each table has a column named skuNumber. I'd like to create a Stored Procedure that can search just the skuN…
How can I test this
What it does it is :
If no value is found for the current it gives output '1'. Not tested but,need to know if it works.
I have 3 tables Table_1,Table_2,Table_3. Table Table_1 has to always be left joined since we want all its data captured all the time. I just want to make sure I am doing it right.
I am playing around with stored procedures and ran into a problem. I followed the example and it runs fine with the Command(s) completed successfully. I open the table and I can't find the record - …
SharePoint installation error wdsrv.msi file not found,
While I'm Installing SharePoint Server 2010, in middle of installation it gives error like - WDSRV.MSI file not found try a new installation …
I have a statement with 5 inner joins, and now I need to add the following to be returned as a column
I'm concerned about performance
Would it be better to use SUM OF or something …
I have a table in my SQL that currently has 900+ records and I noticed that the ID length is 4. I'm worried that when it reaches 9999 it will give me error and no longer write data.
How do I incre…
I need to calculate averages miles driven for the car on the day of the week and the overall average. The result need to be displayed on one line. I am using PIVOT table but seems no able to get it to…
I have a table that has two different types of dates Calendar date and business date.
The calendar date is based on the normal calendar date, while the business date is based on a defined bu…
Anyone up for a bit of a challenge? I have a query like the one below.
timeIn is a datetime column
timeOut is a datetime column
carType is a string
limitTimeToCheckIn is a number of min…
What's the difference between these two qualifiers:
datediff(d, max(t.created), getDate()) <= 45
max(txn.created) > DATEADD(DAY, -45, GETDATE())
I'm thinking with the first one you…
I've got some scenarios where the first and last name is NULL. I'm assuming, because of the way I've got things grouped, that is why I get some extra rows.
I say "extra rows," because when I elimi…
I need to concatenate comments based on the customer ID, activity date, activity code, activity time.
I wrote code to get the duplicate number which tells you how many rows one comment should consi…
Guys I have a problem with SqlConnection at this code and I cant find whats missing
so anyone help;
I use the following sqlcmd method in order to generate a csv file from a select of an specific table:
sqlcmd -S -d -U -P -i "export_csv.sql" -o "out\out-Temp.csv" -s";" -w 700 -W…
I have a database in Azure SQL. It is 50 GB in size. I made changes to many of its columns, changing nvar to var, deleting rows, but the size remains about the same. I Exported it to a backpac and imp…
I have the 3 following Zip Codes in my file
Per the flat file spec's from my client, I have to return 9 characters and not use the hyphen that separates the Left 5 …
I am insert data into a table called Persons using the code below. Basically i am moving data out of the Operations table into the Persons table.
The Persons table has an ident…
just need one clarification, we have an application which is build in Classic ASP and beck end we are using SQL 2008, now are planning to migrate SQL with SQL 2014, so can you please sugge…
How would I get a BULK INSERT statement to only insert the CSV with most recent file creation date?
Any assistance is welcome.