Ask a Question related to Coldfusion Database Access, Design and Development.
-
mactech999 #1
Removing Commas From a field
Hello I have 2 fields that are name the same in different tables. One is called
: ProductGrade.GradeID and the other is
Parts.GradeID.
now my problem is this I need a way to link these two tables however the
Parts.GradeID has some of the entries typed in like this:
3,4
is there a way for me to get them to be like this instead
3
4
if i can then I would be able to compare the tables like this Parts.GradeID =
ProductGrade.GradeID I can't right now because they do not equal each other..
thanks for the help
mactech999 Guest
-
Removing paragraph mark in a field
Hi all I need some help please I am trying to remove the pragraph marks ^p in a text field called - advert.DescriptionDetails when... -
Counting commas in string
Does ColdFusion have a function that counts a certain character in a string? -
Removing characters out of a field
I have a search screen and the user will be entering an isbn number to search. Some users will enter dashes and others will not. My database field... -
DataFormatString shows currency, but without commas
Hi, How do I get the commas into my datafield if it is a currency. I am dealing with hundred thousands, so it would really help out the user if... -
Commas Missing.
Hello everyone, I have a table with a column for real estate property values. The format of the column is float(8,2). When the results are... -
Dan Bracuk #2
Re: Removing Commas From a field
Normalize your database. Then you won't have problems like this.
Dan Bracuk Guest
-
philh #3
Re: Removing Commas From a field
You need a database redesign. If Parts.GradeID is supposed to be the foreign
key to the GradeID field in ProductGrade, i.e. it's the "link" that joins the
two tables, then it's designed incorrectly. Each field should hold one
discrete piece of information, not a list. Lists don't cut it for normalized
relational DB design, and you're going to drive yourself crazy trying to work
around this flaw.
philh Guest
-
mactech999 #4
Re: Removing Commas From a field
yeah the only problem with that is we have a program that need the information
that way with the commas in the field... so i'm looking for a work around I
know there are ways just need to find one.
if anyone has any ideas other than redoing the database please let me know..
thanks
mactech999 Guest
-
-
-
-
MikerRoo #8
Re: Removing Commas From a field
Your options vary hugely based on what RDBMS you are using and how the program
accesses the database.
The best solution is to normalize your database but create a view that the
program accesses for its bastardized format.
The view could even have the same name as the old table and the program would
be none the wiser.
Details depend on RDBMS and what else the program does.
Just a pure workaround, with no database changes whatsoever, is short-sighted
but possible -- depending (again) on what DB is in use.
MikerRoo Guest
-
jorgepino #9
Re: Removing Commas From a field
you could use a loop
<cfloop index = "ListElement"
list = "1,2,3,4">
<cfoutput>#ListElement#</cfoutput><br>
</cfloop>
1
2
3
4
jorgepino Guest



Reply With Quote

