House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Possible to use value statement and dual in mysql 5?

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hi, all...
Rick Faircloth
05/20/08 03:40 P
No, dual is a MySQL function, also.
Rick Faircloth
05/21/08 08:52 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Faircloth
05/20/2008 03:40 PM

Hi, all... Does anyone know if it's possible to use a value statement in this query that uses "dual"? I need to insert a value of "hmls" for the field "mls" in the property_photos table when this query is run...     insert       into property_photos            ( photo_filename, photo_mls_number )                        select '#photolist.name#', '#listfirst(photolist.name, '_')#'       from dual      where not exists (select photo_filename       from property_photos      where photo_filename = '#photolist.name#') Thanks, Rick

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
AJ Mercer
05/21/2008 03:26 AM

I think you will find 'dual' is an oracle only thing ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Faircloth
05/21/2008 08:52 AM

No, dual is a MySQL function, also. I just haven't found a way to use "value" statements as part of the "dual" select statement involved.  The "dual" method seems to be limited to the specific function of catching duplicates. Rick ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Faircloth
05/21/2008 08:53 AM

I worked around the problem by just running a separate update query to change the 'mls' field value after the photos are processed. ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference