Using SQL, what is one way to detect case-sensitive changes between a historical and daily snapshot table (same schema)? Assume the following structure for both tables, and that we want to detect changes on FirstName and LastName: ID (PK) FirstName (cannot be null) LastName (cannot be null)
By using the HASHBYTES function, you can easily detect changes. Since we want to detect changes on FirstName and LastName, we need to combine the HASHBYTES function with the CONCAT function. Here is the snippet which would be a column in the query (or computed column in a table): HASHBYTES(‘SHA1’, CONCAT(FirstName, LastName)) By using the above, you simply compare. For simplicity, let’s just select the IDs from Table1 that differ from Table2. Also assume the above is a computed column called ChangingHash. SELECT A.ID FROM Table1 A INNER JOIN Table2 B ON A.ID = B.ID AND A.ChangingHash <> B.ChangingHash
Using jQuery, how would you select an element that contains BOTH classes A and B (hint: think intersection).
You can use a jQuery selector: $(‘.A.B’) Note: There must be NO space between A.B; having a space selects descendants of elements with class A that have class B. You can also select an element that contains EITHER class A or B (think union): $(‘.A, .B’)
If you put the “this” keyword before a method argument, such as MyMethod(this string param1), what are you actually doing?
You are creating an extension method. For example, in the function given in the question, the function is extending the string type. In other words, it allows you to do things such as “Hello World”.MyMethod().