RE: Primary Keys Duplicate Values

2002-10-07 Thread Subramanian, Samy

U might want to use this query

select field1 from yourtable group by field1 having count(*)  1

this would result all the duplicate row.

If u want to list down all the duplicate records

select * from yourtable where field1 in (select field1 from yourtable group
by field1 having count(*)  1)

good luck

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 07, 2002 10:24 AM
To: CF-Talk
Subject: RE: Primary Keys  Duplicate Values


If all of your current fields have meaning, I recommend that you add a new
field that is a meaningless number that you use as your key field.  I've
found that if I use a field with meaning as my key that I end up wanting to
change that value.  Exceptions might be code tables like ZIP Code and State
Abbreviations where you have a reasonable expectation that the key (zip code
or abbreviation) will never change.

Andy

-Original Message-
From: Srimanta [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 07, 2002 4:43 AM
To: CF-Talk
Subject: OT: Primary Keys  Duplicate Values


Hi,
Once again its me.

I have a table with 18000 records.
There are three fields say field1, field2 and field3.
There are no primary keys at the moment.

I want to delegate field1 as the primary key in the modified table.
When I try to create field1 as the primary key, an error is generated as
there are duplicate values in the records in field1.
How do I find which values are duplicate in field1.
I cannot use the Find and replace function as I do not know which values to
look for. Also manually it is impossible as there are too many records to
search through.
Is there a Cold Fusion custom tag or function  or SQL syntax I can use?
Any help will be much appreciated.

Thanks
Srimanta
- Original Message -
From: Kola Oyedeji [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, October 07, 2002 9:38 PM
Subject: RE: Variable locking


 Hi

 I'm joining this thread late. Can I just confirm what you guys are
 saying: In CFMX named locks should be used in place of scoped locks and
 locks are only needed
 When a possible race condition could occur?

 Thanks

 Kola

 -Original Message-
 From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
 Sent: 04 October 2002 22:53
 To: CF-Talk
 Subject: Re: Variable locking

 On Friday, Oct 4, 2002, at 12:07 US/Pacific, Gaulin, Mark wrote:
  Actually, that using NAME is not a better practice... the SCOPE
  attribute is
  safer and is also what MM support advised us to use (when applicable).

 Pre-MX.

  Sure, the scope of a NAME-based lock will be tighter than using SCOPE,

  but
  SCOPE will be safer and, as a bonus, you can use CF 5's (and prior)
  auto-checking for missing locks...

 Which is no longer available in MX because it is no longer needed.

  Basically, NAME is older than SCOPE, and SCOPE was added to
 address
  issues that NAME cannot handle.

 SCOPE was added to resolve bugs in earlier releases of CF around the
 shared scope memory corruption problems. That is no longer an issue in
 CFMX.

 An Architect's View -- http://www.corfield.org/blog/

 Macromedia DevCon 2002, October 27-30, Orlando, Florida
 Architecting a New Internet Experience
 Register today at http://www.macromedia.com/go/devcon2002





~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: How to get directory from full URL?

2002-10-01 Thread Subramanian, Samy

#GetDirectoryFromPath(url)# should bring the directory

-Original Message-
From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 2:37 PM
To: CF-Talk
Subject: RE: How to get directory from full URL?


Ahh... PATH_TRANSLATED.

You're right (not that you need me to tell you this), PATH_TRANSLATED will
use backslashes.  Wasn't the original question about a URL, tho?

Confused in CF-Talk

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


 -Original Message-
 From: Larry Juncker [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 01, 2002 2:14 PM
 To: CF-Talk
 Subject: RE: How to get directory from full URL?


 And here is my example, based on the question at hand:

 Path_Translated = F:\Websites\4ComPart\IMT_GetsResults\getReturns.cfm
 Reverse(Path_Translated) =
 mfc.snruteRteg\stluseRsteG_TMI\traPmoC4\setisbeW\:F
 Reverse(ListRest(Reverse(PATH_TRANSLATED),\\)) =
 F:\Websites\4ComPart\IMT_GetsResults

 Larry Juncker
 Senior Cold fusion Developer
 Heartland Communications Group, Inc.
 [EMAIL PROTECTED]
 (515) 574-2122

 CONFIDENTIALITY NOTICE
 The information contained in this e-mail is intended only for the
 use of the
 individual or entity to which it is addressed.  This e-mail may contain
 information that is privileged, confidential and/or personal.  If
 the reader
 of this message is not the intended recipient (or the employee or agent
 responsible to deliver it to the intended recipient), you are hereby
 notified that any dissemination, distribution, or copying of this
 communication is prohibited.

 If you have received this communication in error, please notify us at the
 e-mail listed above.

 -Original Message-
 From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 01, 2002 12:56 PM
 To: CF-Talk
 Subject: RE: How to get directory from full URL?


 Pardon?  Reversed the delimiter?

 Reverse simply changes the order of the characters.  It doesn't
 hold them up
 to a mirror and get new characters.

 Reverse(/) = /
 Reverse(\) = \
 Reverse(/\) = \/
 Reverse(\/) = /\

 --
 Mosh Teitelbaum
 evoch, LLC
 Tel: (301) 625-9191
 Fax: (301) 933-3651
 Email: [EMAIL PROTECTED]
 WWW: http://www.evoch.com/


  -Original Message-
  From: Larry Juncker [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, October 01, 2002 1:34 PM
  To: CF-Talk
  Subject: RE: How to get directory from full URL?
 
 
  Actually, the way that works with testing is:
 
  #Reverse(ListRest(Reverse(PATH_TRANSLATED),\\))#
 
  You have reversed the string, therefore, you have reversed the
  delimiter.
 
  Just my two cents...
 
  Larry Juncker
  Senior Cold fusion Developer
  Heartland Communications Group, Inc.
  [EMAIL PROTECTED]
  (515) 574-2122
 
  CONFIDENTIALITY NOTICE
  The information contained in this e-mail is intended only for the
  use of the
  individual or entity to which it is addressed.  This e-mail may contain
  information that is privileged, confidential and/or personal.  If
  the reader
  of this message is not the intended recipient (or the employee or agent
  responsible to deliver it to the intended recipient), you are hereby
  notified that any dissemination, distribution, or copying of this
  communication is prohibited.
 
  If you have received this communication in error, please notify
 us at the
  e-mail listed above.
 
  -Original Message-
  From: Kevin Graeme [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, October 01, 2002 11:34 AM
  To: CF-Talk
  Subject: RE: How to get directory from full URL?
 
 
   Reverse(ListRest(Reverse(fullurl),/))
 
  Oooh, that's just durn purty.
 
  Kevin Graeme
 
 
 

 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: CFQUERY and STARTROW=0 (??!)

2002-10-01 Thread Subramanian, Samy

The CF query start row starts with 1 not 0

-Original Message-
From: Tom Sammons [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 5:09 PM
To: CF-Talk
Subject: CFQUERY and STARTROW=0 (??!)


Hi all,

I was looking up some stuff on joins versus unions, and came across an
opinion that used CFQUERY as an example. (I won't post the url since I
don't know if it's kosher here.)

However, under this person's tutorial topic called Limiting Results it
used this code:

CFQUERY DATASOURCE = Friends Name = Query1 Maxrows = 10 Startrow
= 0

followed by the comment:

Note that the starting row is set at 0. Remember that computers start
numbering at 0, not 1.
So the first record in the database is record number 0.

---

Now, I understand offsets, et cetera, but I've never heard it used
regarding cfquery (or any other sql query for that matter -- I couldn't
even find another mention of startrow=0 anywhere in google or
altavista for any major sql platform...).

And obviously, I've never had a problem with using startrow=1 missing
the first record of a query return set.

Has anyone else ever used startrow=0 in *any* sql platform, is it
practical/standardized, or is this guy just telling people to do things
the
way he thinks they should be?

Inquiring minds (at least one) want to know...

Tom

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm