Tag Info

New answers tagged

0

Unfortunately there is no way to use SQL (that I know of) to ask DB2 for all its databases. Perhaps this is a difference between how DB2 is set up/managed versus other databases. A DB2 instance is essentially a database server. It does not do SQL per se as it is not a database. It is the "brains" or "guts" that runs the DB2 logic (and yes, it thus runs SQL, ...


1

It's difficult to understand your question. Do you mean that you want to copy the data in a table into new rows, but update DATE values? For example, is the following what you're trying to do? ORIGINAL TABLE_1: TABLE_ID | VALUE_1 | VALUE_2 | DATEFIELD 1 | 'Somedata' | 'Someotherdata' | 2012-05-01 ... And you want to produce: UPDATED ...


2

Use an OR to check if either the parameter matches the value, or both the parameter and the value are NULL, like this: WHERE ( [TBL_OUTBOUND_REVIEW].[ERROR_FREE] = @Status OR ([TBL_OUTBOUND_REVIEW].[ERROR_FREE] IS NULL AND @Status IS NULL) ) You could also use a CASE statement as your IF if you really wanted to, but I think it's easier to ...



Top 50 recent answers are included