Monday 8 February 2010

Openoffice For Dummies

[simpleaffiliate source="chitika" results="0"][/simpleaffiliate]
openoffice for dummies
Question about OpenOffice Base or SQL?

I am trying to figure out how to make a query for my table which searches only for a portion of the full name. I have a list of library books I want to categorize, and I am trying to make a query for books containing the title "Dummies" in the name, such as "Cooking for Dummies."

I tried using the query creation wizard to make the query, but I can't seem to get it to work right. I have tried using the features 'equal to, less than, greater than, etc.,' but none of them seem to work for matching a single word from a title.

Here is the SQL query file I have now:

SELECT "Library"."Title" AS "Title", "Library"."Genre" AS "Genre", "Library"."Notes" AS "Notes" FROM "Library" "Library" WHERE ( "Library"."Title" = 'Dummies' AND "Library"."Notes" = 'Unread' ) ORDER BY "Library"."Title", "Library"."Notes"

I assume the equals sign next to Dummies needs to be changed, but what do I change it to?
Thanks! The "Like '%Dummies%'" worked.


You need to use LIKE. Check out the help for whatever DB you are using on how to qualify the condition.

Most likely it is something similar to ("Library"."Title" like '%Dummies%' ...)

See Techonthenet, link below.

SQL: LIKE Condition

--------------------------------------------------------------------------------

The LIKE condition allows you to use wildcards in the where clause of an SQL statement. This allows you to perform pattern matching. The LIKE condition can be used in any valid SQL statement - select, insert, update, or delete.

The patterns that you can choose from are:

% allows you to match any string of any length (including zero length)

_ allows you to match on a single character



Examples using % wildcard

The first example that we'll take a look at involves using % in the where clause of a select statement. We are going to try to find all of the suppliers whose name begins with 'Hew'.

SELECT * FROM suppliers
WHERE supplier_name like 'Hew%';



You can also using the wildcard multiple times within the same string. For example,

SELECT * FROM suppliers
WHERE supplier_name like '%bob%';

In this example, we are looking for all suppliers whose name contains the characters 'bob'.


Open Office Calc Grundkurs - 4.1 Diagramme Einführung und Zi









[simpleaffiliate source="amazon" results="10"]openoffice for dummies[/simpleaffiliate]
[simpleaffiliate source="cj" results="10"]openoffice for dummies[/simpleaffiliate]
[simpleaffiliate source="clickbank" results="10"]openoffice for dummies[/simpleaffiliate]

No comments:

Post a Comment