Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 6 of 6 total |
Validation |
Tue, Sep 20 2011 2:59 AM | Permanent Link |
Petter Topp | How to validate/control the the length of a value (in the where clause I can
test if the value is Null or any specified value), but how do I verify that a given value has the minimum length? Petter |
Tue, Sep 20 2011 3:16 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Petter
On the basis of what you've posted I think you're looking for LENGTH. If that's wrong can we have some more details please. Roy Lambert [Team Elevate] |
Tue, Sep 20 2011 4:04 AM | Permanent Link |
Petter Topp | Hi Roy.
What I would like is: SELECT col1, col2 WHERE (col1 = Null OR LENGTH(col1) < 5) AND (col = Null OR LENGTH(col2) < 9) I seem to remember that you can't use functions in the where clause - so I need an alternative Petter "Roy Lambert" skrev i nyhetsmeldingen: D893D2D8-5D06-42E9-A786-EC9156D4FE05@news.elevatesoft.com ... Petter On the basis of what you've posted I think you're looking for LENGTH. If that's wrong can we have some more details please. Roy Lambert [Team Elevate] |
Tue, Sep 20 2011 5:14 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Petter
Works here with V4. Try it and see Roy Lambert [Team Elevate] |
Tue, Sep 20 2011 6:17 AM | Permanent Link |
Petter Topp | Sure it works - I don't know why I thought that functions in the where
clause did not work. Must be getting old.... Thanks "Roy Lambert" skrev i nyhetsmeldingen: 07203233-21C8-4F94-B686-D8B10441B3CF@news.elevatesoft.com ... Petter Works here with V4. Try it and see Roy Lambert [Team Elevate] |
Fri, Sep 23 2011 3:34 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Petter,
<< Sure it works - I don't know why I thought that functions in the where clause did not work. >> You are probably thinking of my warnings about functions in the WHERE clause not being optimized. They work, but when used around a column for a comparison, will cause the comparison to be un-optimized. For example: Assume an index on MyColumn (String field) Optimized: MyColumn = UPPER('Test') Un-Optimized: SUBSTRING(MyColumn,1,4) = UPPER('Test') << Must be getting old.... >> You and everyone else on the planet. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |