Robert,
Before you approach applying a formula or business logic against a piece of
data, you need to practice how to read the data from the DB and how to
import a CSV from your file system onto a CFM template.

I am not sure what you mean by pitfalls of querying.  SQL is made to handle
exceptions, conditional processing and complex business calculations.  Bad
queries usually stem from badly planned schemas or business logic
implementation.

You need to have two separate mind sets when writing queries:
1) Business - What do I need in the end to show?
2) Development - What kind of data input do I need and how should I process
it?

I would practice more with cfquery for database connected queries and also
with cffile for CSV data.  More advanced implementations just use the
database to import and process the CSV, so that you can perform data joins.

Keep in mind that a good practice would be to not have your business logic
formula on your display template.  Your display page should just show the
end result, while you processing pages or database routines will apply
business logic and transform your data.

There are a lot of examples online for doing both.

On 3/19/07, Robert Reil <[EMAIL PROTECTED]> wrote:

 Im trying to logic through how to do the following. Any input would be
appreciated.
I understand in the end I can just use <cfquery> to call this data when I
am ready to build an app to do this but for now I am trying to get a grip on
how to structure this logic.

I have 2 pieces of data:

A: Original exported data from a DB from the below venor. Included are:
PartNo, my OLD cost, our sales price, text formula of how to turn my OLD
cost, into our sales price.

B: New price sheet in csv form from the vendor showing PartNo, and my
cost.

My goal is to update our sales price to new prices based on our new costs,
and the formula.
To do that I need to:

1    Populate the formula field with a "REAL CF READABLE formula".
      Where can I get info on how to structure these kinds of formula?

2    Build guidelines for updates. I see there are many pitfalls in
selecting, and updating data. I wonder if some patient folks out there could
share with this normally Friday only guy.

Thanks in advance for your patience and guidance.

Robert P. Reil

Managing Director,

Motorcyclecarbs.com, Inc.

4292 Country Garden Walk NW

Kennesaw, Ga. 30152

Office 770-974-8851

Fax 770-974-8852

www.motorcyclecarbs.com




--
Teddy R. Payne
Adobe Certified ColdFusion MX 7 Developer
Google Talk - [EMAIL PROTECTED]

Atlanta ColdFusion User Group - http://www.acfug.org
Atlanta Flash & Flex User Group - http://www.affug.org



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to