Skip site navigation (1) Skip section navigation (2)

How to build a query

From: Krzysztof Walkiewicz <bars0(at)op(dot)pl>
To: pgsql-novice(at)postgresql(dot)org
Subject: How to build a query
Date: 2010-03-02 10:06:57
Message-ID: (view raw or whole thread)
Lists: pgsql-novice
Hello everyone!

In my table I have a column phone_numbers (varchar 30) that the 
telephone numbers are stored in the following way (13 signs with spaces):

032 321 24 25
032 341 24 85
032 345 24 87

But in the same column there is also few hundred of mobile numbers that 
i want to copy to another table. They were written in the following way 
(11 signs with spaces):

606 605 504
506 504 548
879 504 152

Now I have a question: how to built a query that will give me only the 
rows that are shorter than 13 signs (and maybe longer than 13 to check 
if there is no mistakes)?

Krzysztof Walkiewicz


pgsql-novice by date

Next:From: Thom BrownDate: 2010-03-02 10:21:34
Subject: Re: How to build a query
Previous:From: Eric ComeauDate: 2010-03-01 13:05:41
Subject: Re: are primary keys always 'needed'

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group