Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zero Fill export 1

Status
Not open for further replies.

Jimgarry

MIS
May 16, 2000
112
Thanks again for the help in advance

Now I am attemping to export my data to a sdf .txt file. No problem.

I want to zero fill the number fields. example

356.99 might look like 000000359.99

using just the copy to command I get 356.99

Any suggestions?

Thanks again
[sig][/sig]
 
If practical, do a SELECT first, then COPY TO, as in:

[tt]select MyField1, MyField2, padl(MyNumField, 10, "0")
copy to MyOutFile SDF[/tt]
[sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
And use the STR() function to convert Numeric type to char.
padl(allt(STR(MyNumField,10,2)), 10, &quot;0&quot;)
Marat
tolgambaev@hotmail.com
[sig][/sig]
 
And use the STR() function to convert Numeric type to char.

Using STR() is unnecessary in this case; PADL will implicitly convert it to character. For Example:

[tab]? vartype(padl(17, 5, '0'))

returns &quot;C&quot;. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Thanks Robert.Your tip is helpful for me.
Marat
tolgambaev@hotmail.com [sig][/sig]
 
Yes Robert, Thanks. Where do you find all these little tricks an tips?

Jim [sig][/sig]
 
He has lots of experience doing it everyday no doubt :p [sig]<p>John Durbin<br><a href=mailto: john@johndurbin.com> john@johndurbin.com</a><br><a href= </a><br>MCP Visual FoxPro<br>
<br>
ICQ #9466492<br>
ICQ VFP ActiveList #73897253[/sig]
 
Yes Robert, Thanks. Where do you find all these little tricks an tips?
He has lots of experience doing it everyday no doubt

Too bad I mentally process 4Gb of data every day, but only have 384Kb of mental RAM. There's a fair amount I've managed to remember by sheer force of repetition, but the key tool in development (like law) is: knowing where to look it up. I rarely post something technical without first cross-checking with the docs (double-dog true of my posts in the SQL Server forum). [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
I rarely post something technical without first cross-checking with the docs

Glad to know I'm not the only that uses this technique.

If only they'd allow this technique on the cert exams. LOL [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>Focus on the solution....Not the problem.[/sig]
 
Jon, sure you not only one that use that way :)
I like Brainbench testing, it allows to use any materials... [sig]<p>Vlad Grynchyshyn<br><a href=mailto:vgryn@softserve.lviv.ua>vgryn@softserve.lviv.ua</a><br>[/sig]
 
Hi Vlad,

I like Brainbench testing, it allows to use any materials...

I agree, to an extent.

I like Brainbench's philosophy of: &quot;You have 3 minutes to complete this question. Refer to the Docs, the application, whatever. But if in 3 minutes you havent answered, Incorrect. On to the next question.&quot;

The only problem I have with Brainbench's exam is that it's offered online. This raises the issue of validity of the user. Bob, with 20 years experience programming, can take & pass the test for Jim, a novice programmer. Or Jim can take the test, but keep asking Bob &quot;Hey..whats the answer to this?&quot; And I feel this is one of the reasons Brainbench's exam gets little recognition in the IT world.

But,IMO, I find it absurd that reference material is not allowed on most certification exams. I understand & recognize the fact that they do not want novice applicants to receive an expert certification. But come on.....in the real world, you use whatever resources you can dig up to find a solution.

And as FoxDev said, the key is knowing where to look it up. [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>Focus on the solution....Not the problem.[/sig]
 
The only problem I have with Brainbench's exam is that it's offered online. This raises the issue of validity of the user. Bob, with 20 years experience programming, can take & pass the test for Jim, a novice programmer. Or Jim can take the test, but keep asking Bob &quot;Hey..whats the answer to this?&quot; And I feel this is one of the reasons Brainbench's exam gets little recognition in the IT world.

I certainly agree, and Brainbench's message just before exam looks quite stupid because noone aware about it. However, think - Bob might not like to give answers. Finally, when Jim will be hired and will not be able to do his job well, it is worse for Jim, not for Brainbench :))
In addition, that is why I like the IT test on Brainbench. It shows general level of person. This means - when you master (or good level) in IT, you probably can learn ANY language and programming tool.

[sig]<p>Vlad Grynchyshyn<br><a href=mailto:vgryn@softserve.lviv.ua>vgryn@softserve.lviv.ua</a><br>[/sig]
 
Finally, when Jim will be hired and will not be able to do his job well, it is worse for Jim, not for Brainbench :))

That's one way to look at it. However, if Jim used Brainbench certification in his credentials and then was unable to perform his duties, the employer would be under the impression that Brainbench certification is easy to obtain and requires very little knowledge on the subject. And therefore, the employer would be less likely to hire the next candidate that lists Brainbench certification on their resume. [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>Focus on the solution....Not the problem.[/sig]
 
Well, I think that good IT must understand that point of view. In addition, good IT don't need any certification approvement, he can know about employee abilities just from short conversation. So, employee that less likely to be hired here somewhat lucky - he will not work with stupid IT :) [sig]<p>Vlad Grynchyshyn<br><a href=mailto:vgryn@softserve.lviv.ua>vgryn@softserve.lviv.ua</a><br>[/sig]
 
I think its time for Jim to Speek. Ive taken the brainbench exam, Ive been programming for a number of years Cobol and Rpg, and foxbase. I got out of programming for a number of years and now Im getting back into it. Boy did this programming world pass me by. I just thank all of you for giving your assistance so freely and the accuacry of the answers is out of this world. I just hope I can assist someone else in the future the way that I have been helped by this web site. Again Thanks. [sig][/sig]
 
I wrote about 90% of the BrainBench VFP questions, so I have some insight behind the design of the test:

* I intended the test to be primarily a candidate screening tool used by potential employers; they could bring in a candidate, sit them in front of a browser, and have them take the test.

* The design was constricted by the BrainBench requirements; this is not to say that the BB restrictions were bad - just that they have an automated test-delivery engine, and your questions and answers had to fit within their contraints and time-limits. Therefore, while it would be better to ask more practical-type questions, the test system constraints impedes this.

* The test outline includes many areas, including those that we hope every veteran VFP developer knows. Some of these areas are very difficult to write a variety of questions and plausible answers for, and even more difficult to write master-level questions and answers for. For example, try to come up with a master-level question and 5 plausible-sounding answers for a topic like enabling tooltips.

* Both myself and my BB overseers and testers tried very hard to make the test &quot;fair&quot; - IOW, every question clearly has one and only one right answer, and the questions and answers are unambiguous, and that they test only VFP knowledge. This is not entirely Microsoft's approach, for better or worse.

* I tried to include some a few very tough questions, ones that only a veteran would likely know, but also ones that are practical and useful (i.e., no questions like &quot;which byte of the header indicates DBF version&quot;). An example is: &quot;what is the maximum size of a VFP table&quot;. Few developers know the answer, but it is critical if you are designing a database system. BTW, the available answers are very far apart, so a precise knowledge is not required.

Based on the results thus far, it would seem that it is fairly easy for someone who has used VFP a bit to get a &quot;passing&quot; score, but pretty difficult to get a &quot;Master&quot; level rating. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Robert, I agree that the test is very good. I just wish I had the level of knowledge, yes I know it will come with time. Please Keep posting like you are.

Jim Garry
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top