Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select SQL Problem
Message
From
02/01/2001 09:36:54
 
 
To
02/01/2001 08:29:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00458422
Message ID:
00458435
Views:
15
Cemal,

>SELECT SUBSTR(partno,ATC("-",partno,1)+1,ATC("-",partno,2)-ATC("-",partno,1)-1) from plan
>
>Its returns
>ABC
>QWE

The width of the column established by the SQL SELECT is being determined by the calculation of the first record. Try adding a PADR around the expression:
SELECT <b>PADR(</b> SUBSTR(partno,ATC("-",partno,1)+1, ;
  ATC("-",partno,2)-ATC("-",partno,1)-1) <b>,15)</b> from plan
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform