Tag Info

New answers tagged

3

Operation 1 Insert records into Table1 that only exist in Table2: INSERT INTO Table1 (address, city, state, zip) SELECT address, city, state, zip FROM Table2 EXCEPT SELECT address, city, state, zip FROM Table1 ; Operation 2 Delete records from Table1 where the record is not in Table2 but the city is in Table2. (assuming that the columns ar ...


1

The only situation where an index with full key cardinality = 1 will help is when you are looking for something that does not exists. By using such index you can quickly conclude that nothing will match your predicate, whereas without the index you will have to scan the table. If you have a large table and you frequently look for things that does not ...


2

Shell quotes typically delimit arguments or escape other special shell characters from shell interpretation. You can contain (and therefore escape) different kinds of shell-quotes within other kinds based on various rules: "''''" - a soft-quoted string can contain any number of hard-quotes. "\"" - a \ backslash can escape a "soft-quote within a ...


1

As Lennart says, you cannot access the data without the engine. You must install the engine on an OS somewhere. Can this be a central server? Most definitely. That is how the businesses I have worked for have set up there databases, regardless of whether they were DB2 LUW, DB2 for i, or SQL Server. So you will want to pick the OS your DB2 installs on. IMHO, ...


1

I'd argue that you should not consider applications, connections and sessions synonymous. An application is an instance of a running software program, materialized as an operating system process. An application may or may not establish one or more connections to a database, however, as @IanBjorhovde mentions, if you look at it from the database manager ...


1

For the most part, application == connection == session when looking at it from DB2's perspective. Someone could probably make an argument that these aren't always necessarily the same in environments using connection concentrator or the database partitioning feature (DPF), but for all intents and purposes it's safe to use the terms interchangeably. ...


0

I ran into a similar problem and while this wasn't what happened here, this answer may help others running into this. Make sure the OS group mygroup is all lowercase. DB2 on AIX does not recognize uppercase letters in the group name and will fail to validate a user belongs to a group if that group name has uppercase letters. eg: # id useraccounthere ...


1

First of all, the syntax for a named parameter marker is CONCAT(:queryDate, '-12.00.00.000000'), that is, it begins with a colon, not a question mark. Processing of parameter markers is performed on the client side, not on the server, and it's irrelevant if your server happens to be DB2 for z/OS or not. The IBM Data Server Client (the common driver for IBM ...


0

If the foreign key constraints don't point to any other table inside of originating database (ie, if SQL Server doesn't point to SQL Server, etc.), then I would drop those foreign keys. They aren't useful. If they do point to other tables, then perhaps you do have to copy what data is needed just to satisfy the constraint. (Ugh). Either that or re-consider ...


2

I dont think CURRENT PACKAGESET is a special register in LUW 10.5. The special registers can be found at: https://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0008404.html?cp=SSEPGG_10.5.0%2F2-12-2-5 SET CURRENT PACKAGESET is a statement that can only be embedded in an application program: ...


1

You need to replace BEGIN ATOMIC with just BEGIN in the trigger body. BEGIN ATOMIC indicates an inlined compound SQL statement, BEGIN -- a compiled compound statement. Documentation states: If multiple events are specified, the triggered action must be a compound SQL (compiled) statement.



Top 50 recent answers are included