Locking Row in SQL 2005-2008
Is there a way to lock a row in the SQL 2005-2008 database without starting a transaction, so other processes cannot update the row until it is unlocked? ...
Is there a way to lock a row in the SQL 2005-2008 database without starting a transaction, so other processes cannot update the row until it is unlocked? ...
I am encountering very infrequent yet annoying SQL deadlocks on a .NET 2.0 webapp running on top of MS SQL Server 2005. In the past, we have been dealing with the SQL deadlocks in the very empirical way - basically tweaking the queries until it work. Yet, I found this approach very unsatisfactory: time consuming and unreliable. I would ...
What tools do you use to develop Oracle stored procedures, in a team : To automatically "lock" the current procedure you are working with, so nobody else in the team can make changes to it until you are finished. To automatically send the changes you make in the stored procedure, in an Oracle database, to a Subversion, CVS, ... reposit...
I have a very large database table in PostgresQL and a column like "copied". Every new row starts uncopied and will later be replicated to another thing by a background programm. There is an partial index on that table "btree(ID) WHERE replicated=0". The background programm does a select for at most 2000 entries (LIMIT 2000), works on th...
How would retrieve all customer's birthdays for a given month in SQL? What about MySQL? I was thinking of using the following with SQL server. select c.name from cust c where datename(m,c.birthdate) = datename(m,@suppliedDate) order by c.name ...
SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part without the time part: 2008-09-22 00:00:00.000 ...
How do you determine the collation of a database in SQL 2005, for instance if you need to perform a case-insensitive search/replace? ...
In order to perform a case-sensitive search/replace on a table in a SQL 2000/2005 database, you must use the correct collation. How do you determine whether the default collation for a database is case-sensitive, and if it isn't, how to perform a case-sensitive search/replace? ...
If I need to choose a collation mode to work with, how do I know what collations are available? ...
I want to perform cascade delete for some tables in my database, but I'm interested in what happens in case there's a failure when deleting something. Will everything rollback? ...
Hi all, Previously I have asked to strip text from a field and convert it to an int, this works successfully. But now I would like to do an INNER JOIN on this new value. So I have this: SELECT CONVERT(int, SUBSTRING(accountingTab.id, PATINDEX('%[0-9]%', accountingTab.id), 999)) AS 'memId', userDetails.title, userDetails.lname FROM ...
Eg. can I write something like this code: public void InactiveCustomers(IEnumerable<Guid> customerIDs) { //... myAdoCommand.CommandText = "UPDATE Customer SET Active = 0 WHERE CustomerID in (@CustomerIDs)"; myAdoCommand.Parameters["@CustomerIDs"].Value = customerIDs; //... } The only way I know is to Join my IE...
It's my understanding that nulls are not indexable in DB2, so assuming we have a huge table (Sales) with a date column (sold_on) which is normally a date, but is occasionally (10% of the time) null. Furthermore, let's assume that it's a legacy application that we can't change, so those nulls are staying there and mean something (let's s...
Our organization has a lot of its essential data in a mainframe Adabas database. We have ODBC access to this data and from C# have queried/updated it successfully using ODBC/Natural "stored procedures". What we'd like to be able to do now is to query a mainframe table from within SQL Server 2005 stored procs, dump the results into a ta...
I have a paradox table from a legacy system I need to run a single query on. The field names have spaces in them - i.e. "Street 1". When I try and formulate a query in delphi for only the "Street 1" field, I get an error - Invalid use of keyword. Token: 1, Line Number: 1 Delphi V7 - object pascal, standard Tquery object name query1. ...
I was given a task to display when a record in the database was added, however, the previous developers never made a field for this, and I can't go back and make up dates for all the existing records. Is there an easy way to extract out a record Creation date from a SQL server 2000 query. SELECT RECORD_CREATED_DATE FROM tblSomething W...
I'm working for a customer with a huge legacy codebase consisting of various Java en JSP based applications. Most querying is done using the home-build 'orm' system. Some applications use Plain Old JDBC. Some applications are based on Hibernate (yes HQL build with plus signs is a potential problem as well). Some of the older application...
I've been reading a little about temporary tables in MySQL but I'm an admitted newbie when it comes to databases in general and MySQL in particular. I've looked at some examples and the MySQL documentation on how to create a temporary table, but I'm trying to determine just how temporary tables might benefit my applications and I guess ...
Looking for suggestions on file system management tools. We have several terabytes of images, pdfs, excel sheets, etc. We're looking at some sort of software that will help us to manage, archive, etc the images. We don't store all the files information in a database but some are and we were hoping to maybe find an app that could help ...
I have a bunch a reports that are printed out and mailed to clients. At the top of the report is the return address, left aligned. I was asked to add an optional logo to the report. This logo should be left of the return address. (The logo and all other info is stored in the database). So if the logo exists, you SHOULD see: <someimage> ...