In SQL Server, how can I lock a single row in a way similar to Oracle’s “SELECT FOR UPDATE WAIT”?

You’re probably looking forwith (updlock, holdlock). This will make a select grab an exclusive lock, which is required for updates, instead of a shared lock. The holdlock hint tells SQL Server to keep the lock until the transaction ends. FROM TABLE_ITEM with (updlock, holdlock)

Can I download an SQLite db on /sdcard and access it from my Android app?

Sure you can. The docs are a little conflicting about this as they also say that no limitations are imposed. I think they should say that relative paths are to the above location and dbs there ARE private. Here is the code you want: File dbfile = new File(“/sdcard/mydb.sqlite” ); SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(dbfile, null); … Read more

What is the MariaDB dialect class name for Hibernate?

Very short answer The current dialects as of this writing are: org.hibernate.dialect.MariaDB102Dialect for MariaDB server 10.2 org.hibernate.dialect.MariaDB103Dialect for MariaDB server 10.3 and later, provides sequence support. org.hibernate.dialect.MariaDB10Dialect for MariaDB server 10.0 and 10.1 org.hibernate.dialect.MariaDB53Dialect for MariaDB server 5.3, and later 5.x versions. org.hibernate.dialect.MariaDBDialect for MariaDB server 5.1 and 5.2. Short answer When using a MariaDB … Read more

How to implement Active Record inheritance in Ruby on Rails?

Rails supports Single Table Inheritance. From the AR docs: Active Record allows inheritance by storing the name of the class in a column that by default is named “type” (can be changed by overwriting Base.inheritance_column). This means that an inheritance looking like this: class Company < ActiveRecord::Base; end class Firm < Company; end class Client … Read more

SQL 2005 – The column was specified multiple times

The problem, as mentioned, is that you are selecting PEID from two tables, the solution is to specify which PEID do you want, for example SELECT tb.* FROM ( SELECT tb1.PEID,tb2.col1,tb2.col2,tb3.col3 –, and so on FROM vCodesWithPEs as tb1 INNER JOIN vDeriveAvailabilityFromPE as tb2 ON tb1.PROD_PERM = tb2.PEID INNER JOIN PE_PDP tb3 ON tb1.PROD_PERM = … Read more