Skip to content

Tag: database

SQL query to filter columns

I have a question regarding the SQL query. I have this table shown below Region Rep Item Quebec Jones Pencil Ontario Kivell Binder Ontario Jardine Pencil Ontario Gill Pen Alberta Sorvino Pencil Quebec Jones Binder Ontario Andrews Pencil Ontario Jardine Pencil Alberta Thompson Pencil Quebec Jones Binder Ontari…

DB2 SELECT from UPDATE Options

I am currently trying to do an However, the version of DB2 I have does not appear to support this Is there any alternative to this in DB2 that could be return a desired result? Where in one query we can Update and Return the result? EDIT – The Select statement is supposed to return the values that are t…

Find value that is not a number or a predefined string

I have to test a column of a sql table for invalid values and for NULL. Valid values are: Any number and the string ‘n.v.’ (with and without the dots and in every possible combination as listed in my sql command) So far, I’ve tried this: The regular expression also matches the single charact…

Get data from database and write it back in again

I have written a function by reading an excel file and writing it to the database. This works! Getting data from the database also works. Where I get stuck is at the point that the function should read each row, calculate it and write the result back to the database. I also want to find out how many rows were