MySQL has this incredibly useful yet properitary REPLACE INTO SQL Command. Can this easily be emulated in SQL Server 2005? Starting a new Transaction, doing a Select() and then either UPDATE or INSERT and COMMIT is always a little bit of a pain, especially when doing it in the application and therefore always keeping 2 […]
What is the best way to upload a large csv data file into SQL server using C# ? The file contains about 30,000 rows and 25 columns.
I am working on a database that usually uses GUIDs as primary keys. By default SQL Server places a clustered index on primary key columns. I understand that this is a silly idea for GUID columns, and that non-clustered indexes are better. What do you think – should I get rid of all the clustered […]
I have existing records like ID Hospital ID Email Description 1 15 email@example.com Sample Description 2 15 firstname.lastname@example.org Random Text I need to use a WHILE loop to insert rows with Hospital ID changing to a specific value or 32 in this case, while the others(not ID as it is auto generated) remaining constant. It […]
I have an SDF file and I would like to retrieve its schema and query it with some UI. How can I do this? I have no Visual Studio installed on the machine and I would like to install as little software as possible.
I have a Table like this one: |UserId | ContactID | ContactName ————————————— | 12456 | Ax759 | Joe Smith | 12456 | Ax760 | Mary Smith | 12458 | Ax739 | Carl Lewis | 12460 | Ax759 | Chuck Norris | 12460 | Bx759 | Bruce Lee I need to add a constraint to […]
I have created number of Crystal Reports in My VB.NET Project getting data from Microsoft Access 2007 (.accdb) Database. Now, I am updating My Application with Microsoft SQL Server (.mdf)Database. How Can I Update the Data Source From Access Files To MDF Files For All of My Crystal Reports? Thanks.
This is probably a simple question: How do I connect to Microsoft SQL Server 2008 R2 from Matlab? How do I read a table into a matrix given some SQL query? Update I’d prefer a method that doesn’t require use of manual setup using ODBC.
I have a column called “WrkHrs” and the data type is time(hh:mm:ss). I want to sum up the working hours for employees. But since it’s time data type sql server doesn’t let me use like sum(columnname). How can I sum up the time data type fieled in sql query?
I need to empty an LDF file before sending to a colleague. How do I force SQL Server to truncate the log?