Hi - ist zwar nicht das was man einen regulären Ausdruck nennt, aber
für die meisten Daten wird's passen.
Wenn Du Dir sicher bist, dass es keine Einträge gibt, die 1Z3456
heißen, dann kannst Du einfach die 'LEFT' Funktion benutzen:
SELECT LEFT( "TextFeld", 6 ) AS "Stellen 1 bis 6",
( CONVERT ( LEFT( "TextFeld", 6 ) , BIGINT ) ) * 3 AS
"Konvertiert und Plutimikation"
FROM "Tabelle1"
WHERE LEFT( "TextFeld", 6 ) >= '0'
AND LEFT( "TextFeld", 6 ) <= '999999'
sonst musst Du jede Stelle einzeln abfragen:
SELECT LEFT( "TextFeld", 6 ) AS "Stellen 1 bis 6",
(CONVERT(LEFT("TextFeld",6),BIGINT)) * 3 AS "Konvertiert und
Plutimikation"
FROM "Tabelle1"
WHERE SUBSTRING ( "TextFeld", 1, 1 ) >= '0' AND SUBSTRING (
"TextFeld", 1, 1 ) <= '9'
AND SUBSTRING ( "TextFeld", 2, 1 ) >= '0' AND SUBSTRING (
"TextFeld", 2, 1 ) <= '9'
AND SUBSTRING ( "TextFeld", 3, 1 ) >= '0' AND SUBSTRING (
"TextFeld", 3, 1 ) <= '9'
AND SUBSTRING ( "TextFeld", 4, 1 ) >= '0' AND SUBSTRING (
"TextFeld", 4, 1 ) <= '9'
AND SUBSTRING ( "TextFeld", 5, 1 ) >= '0' AND SUBSTRING (
"TextFeld", 5, 1 ) <= '9'
AND SUBSTRING ( "TextFeld", 6, 1 ) >= '0' AND SUBSTRING (
"TextFeld", 6, 1 ) <= '9'
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.