<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-608</id>
	<title>Nabble - Cold Fusion - SQL</title>
	<updated>2009-11-18T03:33:10Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Cold-Fusion---SQL-f608.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cold-Fusion---SQL-f608.html" />
	<subtitle type="html">SQL is a mailing list dealing with the structured query language (SQL) use in database interaction.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26406510</id>
	<title>CF8 / MS SQL Server 2008 Problem with &quot;contains&quot;</title>
	<published>2009-11-18T03:33:10Z</published>
	<updated>2009-11-18T03:33:10Z</updated>
	<author>
		<name>Edward Chanter</name>
	</author>
	<content type="html">&lt;br&gt;Greetings,
&lt;br&gt;&lt;br&gt;I'm hoping to pick your collective brains about a problem I'm seeing with
&lt;br&gt;querying index on MS SQL 2008. We're running a CF8.01 server on linux red
&lt;br&gt;hat and apache, it connects to a MS SQL Server 2008 box. There is a simple
&lt;br&gt;database table called &amp;quot;content&amp;quot; assume for the minute that it has 2 rows, an
&lt;br&gt;id and title. The title is indexed and it has over a thousand rows in it
&lt;br&gt;with titles of articles that are being uploaded. When I run the following
&lt;br&gt;query in MS SQL Management Studio 2008:
&lt;br&gt;&lt;br&gt;select title
&lt;br&gt;from content
&lt;br&gt;where CONTAINS (title, '&amp;quot;how to be headhunted&amp;quot;' )
&lt;br&gt;&lt;br&gt;It returns 1 result which is correct.
&lt;br&gt;&lt;br&gt;I then run the same exact query through the CF8 server it returns no results
&lt;br&gt;at all. I've tried it on various different databases on the server and the
&lt;br&gt;result is always the same.
&lt;br&gt;&lt;br&gt;I'm assuming there must be something in the JDBC driver that is causing this
&lt;br&gt;but I've been searching and I can't find any reports of anyone else having
&lt;br&gt;the same problem.
&lt;br&gt;&lt;br&gt;best wishes,
&lt;br&gt;&lt;br&gt;      -= Ed
&lt;br&gt;&lt;br&gt;--------------------------------------------
&lt;br&gt;Edward Chanter
&lt;br&gt;Technical Innovations Manager
&lt;br&gt;Collaborative Connections Ltd.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.cc.uk.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cc.uk.com/&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26406510&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ed@...&lt;/a&gt;
&lt;br&gt;Landline: 01273 832221
&lt;br&gt;Mobile: 07866 365282
&lt;br&gt;YIM!: jumperb
&lt;br&gt;MSN: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26406510&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ed@...&lt;/a&gt;
&lt;br&gt;You can find me on FaceBook too!
&lt;br&gt;--------------------------------------------
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3252&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3252&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/CF8---MS-SQL-Server-2008-Problem-with-%22contains%22-tp26406510p26406510.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26241806</id>
	<title>Re: group by problem!</title>
	<published>2009-11-06T19:20:33Z</published>
	<updated>2009-11-06T19:20:33Z</updated>
	<author>
		<name>Maureen-2</name>
	</author>
	<content type="html">&lt;br&gt;the where clause is returning ID so you need to Group by id, not F1
&lt;br&gt;&lt;br&gt;On Wed, Nov 4, 2009 at 1:30 AM, shahrzad khorrami
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26241806&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;shahrzad.khorrami@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; select * from test where id in( SELECT id FROM test
&lt;br&gt;&amp;gt; WHERE f1 in *('432350221818600,355801020050524','432350221818600,355801020050525')
&lt;br&gt;&amp;gt; *
&lt;br&gt;&amp;gt; GROUP BY f1
&lt;br&gt;&amp;gt; HAVING MAX(f10::int)&amp;gt;1 and MAX(f2::int)&amp;gt;1);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; but this query raised an error:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ERROR:  column &amp;quot;test.id&amp;quot; must appear in the GROUP BY clause or be used in an
&lt;br&gt;&amp;gt; aggregate function
&lt;br&gt;&amp;gt; LINE 1: select * from test where id in( SELECT id FROM test
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; but if I change Group BY f1,id , the result will be wrong , what can I do?
&lt;br&gt;&amp;gt; or if I MAX(id).... result is wrong to :
&lt;br&gt;&amp;gt; 577 | 432350221818600,355801020050525 | A  | 43.28 | N  | -80.07 | E  | 08 |
&lt;br&gt;&amp;gt; 0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 082234 | 121109
&lt;br&gt;&amp;gt; 523 | 432350221818600,355801020050524 | A  | 43.28 | N  | -80.07 | E  | 08 |
&lt;br&gt;&amp;gt; 0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 092213 | 121109
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks in advace
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Shahrzad Khorrami
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3251&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3251&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/group-by-problem%21-tp26193707p26241806.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26193707</id>
	<title>group by problem!</title>
	<published>2009-11-04T01:30:40Z</published>
	<updated>2009-11-04T01:30:40Z</updated>
	<author>
		<name>shahrzad khorrami</name>
	</author>
	<content type="html">&lt;br&gt;hi all,
&lt;br&gt;&lt;br&gt;in postgres
&lt;br&gt;&lt;br&gt;&lt;br&gt;Column | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|
&lt;br&gt;Modifiers
&lt;br&gt;--------+---------------------
&lt;br&gt;--+---------------------------------------------------
&lt;br&gt;&amp;nbsp;id &amp;nbsp; &amp;nbsp; | integer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | not null default
&lt;br&gt;nextval('test_id_seq'::regclass)
&lt;br&gt;&amp;nbsp;f1 &amp;nbsp; &amp;nbsp; | character varying(32) |
&lt;br&gt;&amp;nbsp;f3 &amp;nbsp; &amp;nbsp; | character varying(32) |
&lt;br&gt;&amp;nbsp;f4 &amp;nbsp; &amp;nbsp; | character varying(32) |
&lt;br&gt;&amp;nbsp;f5 &amp;nbsp; &amp;nbsp; | character varying(32) |
&lt;br&gt;&amp;nbsp;f6 &amp;nbsp; &amp;nbsp; | character varying(32) |
&lt;br&gt;&amp;nbsp;f7 &amp;nbsp; &amp;nbsp; | character varying(32) |
&lt;br&gt;&amp;nbsp;f8 &amp;nbsp; &amp;nbsp; | character varying(32) |
&lt;br&gt;&amp;nbsp;f9 &amp;nbsp; &amp;nbsp; | character varying(32) |
&lt;br&gt;&amp;nbsp;f11 &amp;nbsp; &amp;nbsp;| character varying(32) |
&lt;br&gt;&amp;nbsp;f12 &amp;nbsp; &amp;nbsp;| character varying(32) |
&lt;br&gt;&amp;nbsp;f13 &amp;nbsp; &amp;nbsp;| character varying(32) |
&lt;br&gt;&amp;nbsp;f14 &amp;nbsp; &amp;nbsp;| character varying(32) |
&lt;br&gt;&amp;nbsp;f2 &amp;nbsp; &amp;nbsp; | character varying(32) |
&lt;br&gt;&amp;nbsp;f10 &amp;nbsp; &amp;nbsp;| character varying(32) |
&lt;br&gt;&lt;br&gt;512 | 432350221818600,355801020050525 | A &amp;nbsp;| 43.28 | N &amp;nbsp;| -80.07 | E &amp;nbsp;| 08 |
&lt;br&gt;0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 082234 | 121109
&lt;br&gt;513 | 432350221818600,355801020050525 | A &amp;nbsp;| 43.28 | N &amp;nbsp;| -80.07 | E &amp;nbsp;| 08 |
&lt;br&gt;0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 082234 | 121109
&lt;br&gt;521 | 432350221818600,355801020050524 | A &amp;nbsp;| 43.28 | N &amp;nbsp;| -80.07 | E &amp;nbsp;| 08 |
&lt;br&gt;0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 192213 | 121109
&lt;br&gt;523 | 432350221818600,355801020050524 | A &amp;nbsp;| 43.28 | N &amp;nbsp;| -80.07 | E &amp;nbsp;| 08 |
&lt;br&gt;0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 092213 | 121109
&lt;br&gt;577 | 432350221818600,355801020050525 | A &amp;nbsp;| 43.28 | N &amp;nbsp;| -80.07 | E &amp;nbsp;| 08 |
&lt;br&gt;0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 082234 | 121109
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;I want to have a query that find the records of each client that are in
&lt;br&gt;('') &amp;nbsp;with the maximum f2(time) and f10(date) and if they were max and we
&lt;br&gt;have two similar records, it return a record with higher id
&lt;br&gt;(it means for each client that are in ('','','',....) give us one record
&lt;br&gt;that have maximum date and time)
&lt;br&gt;&lt;br&gt;according to the above data, I want this result:
&lt;br&gt;577 | 432350221818600,355801020050525 | A &amp;nbsp;| 43.28 | N &amp;nbsp;| -80.07 | E &amp;nbsp;| 08 |
&lt;br&gt;0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 082234 | 121109
&lt;br&gt;521 | 432350221818600,355801020050524 | A &amp;nbsp;| 43.28 | N &amp;nbsp;| -80.07 | E &amp;nbsp;| 08 |
&lt;br&gt;0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 192213 | 121109
&lt;br&gt;&lt;br&gt;----------------------------------------------------------------------------------------------------------------------
&lt;br&gt;what Do I...&amp;gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;select * from test where id in( SELECT id FROM test
&lt;br&gt;WHERE f1 in *('432350221818600,355801020050524','432350221818600,355801020050525')
&lt;br&gt;*
&lt;br&gt;GROUP BY f1
&lt;br&gt;HAVING MAX(f10::int)&amp;gt;1 and MAX(f2::int)&amp;gt;1);
&lt;br&gt;&lt;br&gt;but this query raised an error:
&lt;br&gt;&lt;br&gt;ERROR: &amp;nbsp;column &amp;quot;test.id&amp;quot; must appear in the GROUP BY clause or be used in an
&lt;br&gt;aggregate function
&lt;br&gt;LINE 1: select * from test where id in( SELECT id FROM test
&lt;br&gt;&lt;br&gt;but if I change Group BY f1,id , the result will be wrong , what can I do?
&lt;br&gt;or if I MAX(id).... result is wrong to :
&lt;br&gt;577 | 432350221818600,355801020050525 | A &amp;nbsp;| 43.28 | N &amp;nbsp;| -80.07 | E &amp;nbsp;| 08 |
&lt;br&gt;0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 082234 | 121109
&lt;br&gt;523 | 432350221818600,355801020050524 | A &amp;nbsp;| 43.28 | N &amp;nbsp;| -80.07 | E &amp;nbsp;| 08 |
&lt;br&gt;0.05 | 1381.0 | 48.28 | 1/4042 | 24/0 | 092213 | 121109
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks in advace
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Shahrzad Khorrami
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3250&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3250&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/group-by-problem%21-tp26193707p26193707.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25914799</id>
	<title>Re: Convert PDF to and From Oracle Error</title>
	<published>2009-10-15T12:35:58Z</published>
	<updated>2009-10-15T12:35:58Z</updated>
	<author>
		<name>Nick G-2</name>
	</author>
	<content type="html">&lt;br&gt;Ok, thanks to this article: &lt;a href=&quot;http://awads.net/wp/2006/02/21/lobs-gotcha-in-coldfusion/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://awads.net/wp/2006/02/21/lobs-gotcha-in-coldfusion/&lt;/a&gt;&lt;br&gt;&lt;br&gt;I found the problem...which was not in the code, it was a setting in CF Administrator. The jist of the link/article is there is under the Data Source where your query is pointing to, under advanced settings there is an option to enable Blob and Clob. You must enabled. 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3249&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3249&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Convert-PDF-to-and-From-Oracle-Error-tp25913339p25914799.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25913345</id>
	<title>Convert PDF to and From Oracle Error</title>
	<published>2009-10-15T10:57:54Z</published>
	<updated>2009-10-15T10:57:54Z</updated>
	<author>
		<name>Nick G-2</name>
	</author>
	<content type="html">&lt;br&gt;I have been trying to load PDF files into Oracle using Coldfusion and download them again and it seems the data is corrupt (thatâs the error message I get when I download it). The files seem to load properly (as byte array) it's when I try to doanload them is when I get the corrupted data error. Any help on what is going on/what the problem is? Here is my code/table:
&lt;br&gt;&lt;br&gt;CREATE TABLE TBL ( 
&lt;br&gt;USERID 	NUMBER(10),
&lt;br&gt;DEPARTDOC BLOB
&lt;br&gt;)
&lt;br&gt;&amp;lt;!--- 1.cfm ---&amp;gt;
&lt;br&gt;&amp;lt;form action=&amp;quot;2.cfm&amp;quot; method=&amp;quot;POST&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; File Name: &amp;lt;input name=&amp;quot;FileName&amp;quot; type=&amp;quot;file&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input name=&amp;quot;Submit&amp;quot; type=&amp;quot;submit&amp;quot; value=&amp;quot;Save&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;/form&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;!--- 2.cfm ---&amp;gt;
&lt;br&gt;&amp;lt;cfset Directory_Path = GetDirectoryFromPath(GetTemplatePath())&amp;gt;
&lt;br&gt;&amp;lt;cfif IsDefined(&amp;quot;Form.Submit&amp;quot;) AND Trim(form.FileName) NEQ &amp;quot;&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;cftry&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cffile action=&amp;quot;upload&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filefield=&amp;quot;form.FileName&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; destination=&amp;quot;#Directory_Path#&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nameconflict=&amp;quot;makeunique&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; accept=&amp;quot;application/iso-8859-1, application/pdf&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cffile 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; action = &amp;quot;readbinary&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file = &amp;quot;#Directory_Path##cffile.serverFile#&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; variable=&amp;quot;file_blob&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cfquery name=&amp;quot;upload&amp;quot; datasource=&amp;quot;dsn&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT INTO TBL (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USERID, DEPARTDOC) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cfqueryparam 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value=&amp;quot;#file_blob#&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cfsqltype=&amp;quot;cf_sql_blob&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/cfquery&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;cfcatch type=&amp;quot;application&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Error...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/cfcatch&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/cftry&amp;gt;
&lt;br&gt;&amp;lt;/cfif&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;!--- 3.cfm ---&amp;gt;
&lt;br&gt;&amp;lt;cfheader 
&lt;br&gt;&amp;nbsp; &amp;nbsp; name=&amp;quot;content-disposition&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; value=&amp;quot;attachment; filename=myFile.pdf&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;cfquery name=&amp;quot;q&amp;quot; datasource=&amp;quot;dsn&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;select DEPARTDOC
&lt;br&gt;&amp;nbsp; &amp;nbsp;from TBL
&lt;br&gt;&amp;nbsp; &amp;nbsp;where userid = 2
&lt;br&gt;&amp;lt;/cfquery&amp;gt;
&lt;br&gt;&amp;lt;cfcontent 
&lt;br&gt;&amp;nbsp; &amp;nbsp; type=&amp;quot;application/iso-8859-1, application/pdf&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; variable=&amp;quot;#q.DEPARTDOC#&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3248&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3248&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Convert-PDF-to-and-From-Oracle-Error-tp25913345p25913345.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25913339</id>
	<title>Convert PDF to and From Oracle Error</title>
	<published>2009-10-15T10:57:34Z</published>
	<updated>2009-10-15T10:57:34Z</updated>
	<author>
		<name>Nick G-2</name>
	</author>
	<content type="html">&lt;br&gt;I have been trying to load PDF files into Oracle using Coldfusion and download them again and it seems the data is corrupt (thatâs the error message I get when I download it). The files seem to load properly (as byte array) it's when I try to doanload them is when I get the corrupted data error. Any help on what is going on/what the problem is? Here is my code/table:
&lt;br&gt;&lt;br&gt;CREATE TABLE TBL ( 
&lt;br&gt;USERID 	NUMBER(10),
&lt;br&gt;DEPARTDOC BLOB
&lt;br&gt;)
&lt;br&gt;&amp;lt;!--- 1.cfm ---&amp;gt;
&lt;br&gt;&amp;lt;form action=&amp;quot;2.cfm&amp;quot; method=&amp;quot;POST&amp;quot; enctype=&amp;quot;multipart/form-data&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; File Name: &amp;lt;input name=&amp;quot;FileName&amp;quot; type=&amp;quot;file&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input name=&amp;quot;Submit&amp;quot; type=&amp;quot;submit&amp;quot; value=&amp;quot;Save&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;/form&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;!--- 2.cfm ---&amp;gt;
&lt;br&gt;&amp;lt;cfset Directory_Path = GetDirectoryFromPath(GetTemplatePath())&amp;gt;
&lt;br&gt;&amp;lt;cfif IsDefined(&amp;quot;Form.Submit&amp;quot;) AND Trim(form.FileName) NEQ &amp;quot;&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;cftry&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cffile action=&amp;quot;upload&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filefield=&amp;quot;form.FileName&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; destination=&amp;quot;#Directory_Path#&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nameconflict=&amp;quot;makeunique&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; accept=&amp;quot;application/iso-8859-1, application/pdf&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cffile 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; action = &amp;quot;readbinary&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file = &amp;quot;#Directory_Path##cffile.serverFile#&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; variable=&amp;quot;file_blob&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cfquery name=&amp;quot;upload&amp;quot; datasource=&amp;quot;dsn&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT INTO TBL (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; USERID, DEPARTDOC) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cfqueryparam 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value=&amp;quot;#file_blob#&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cfsqltype=&amp;quot;cf_sql_blob&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/cfquery&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;cfcatch type=&amp;quot;application&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Error...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/cfcatch&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/cftry&amp;gt;
&lt;br&gt;&amp;lt;/cfif&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;!--- 3.cfm ---&amp;gt;
&lt;br&gt;&amp;lt;cfheader 
&lt;br&gt;&amp;nbsp; &amp;nbsp; name=&amp;quot;content-disposition&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; value=&amp;quot;attachment; filename=myFile.pdf&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;cfquery name=&amp;quot;q&amp;quot; datasource=&amp;quot;dsn&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;select DEPARTDOC
&lt;br&gt;&amp;nbsp; &amp;nbsp;from TBL
&lt;br&gt;&amp;nbsp; &amp;nbsp;where userid = 2
&lt;br&gt;&amp;lt;/cfquery&amp;gt;
&lt;br&gt;&amp;lt;cfcontent 
&lt;br&gt;&amp;nbsp; &amp;nbsp; type=&amp;quot;application/iso-8859-1, application/pdf&amp;quot; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; variable=&amp;quot;#q.DEPARTDOC#&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3247&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3247&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Convert-PDF-to-and-From-Oracle-Error-tp25913339p25913339.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25901415</id>
	<title>Subscribe</title>
	<published>2009-10-14T17:37:03Z</published>
	<updated>2009-10-14T17:37:03Z</updated>
	<author>
		<name>NieJieqiang</name>
	</author>
	<content type="html">&lt;br&gt;Subscribe
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3246&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3246&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Subscribe-tp25901415p25901415.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25369053</id>
	<title>Re: Single Column DISTINCT in Multiple Column SELECT</title>
	<published>2009-09-09T09:51:38Z</published>
	<updated>2009-09-09T09:51:38Z</updated>
	<author>
		<name>Richard Dillman-2</name>
	</author>
	<content type="html">&lt;br&gt;Your going to have to aggrigate those other 2 columns (min,
&lt;br&gt;max,sum...) and then group by the Job_ID(the non aggregated item)
&lt;br&gt;&lt;br&gt;SELECT &amp;nbsp; DISTINCT job_id,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *Min*(employee_id),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *Min*(last_name)
&lt;br&gt;FROM &amp;nbsp; &amp;nbsp; employees
&lt;br&gt;GROUP BY job_id
&lt;br&gt;ORDER BY last_name
&lt;br&gt;&lt;br&gt;This would return the first instance of each Job_ID, but you are loosing any
&lt;br&gt;additional employees that also use that job ID.
&lt;br&gt;&lt;br&gt;I guess the real question is what are you trying to get as a result?
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Wed, Sep 9, 2009 at 12:19 PM, Lewis Billingsley &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25369053&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Billingsly@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thank you for responding. &amp;nbsp;What I want to do is very simple, but the
&lt;br&gt;&amp;gt; solution may not be. &amp;nbsp;Usually, if you use DiSTINCT in a SELECT statement,
&lt;br&gt;&amp;gt; the recordset returned will give you distinct values for all columns in the
&lt;br&gt;&amp;gt; SELECT statement:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; SELECT DISTINCT Job_ID, Employee_ID, Last_Name
&lt;br&gt;&amp;gt; FROM Employees
&lt;br&gt;&amp;gt; ORDER BY Last_Name
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; This will return distinct values for Job_ID, Employee_ID, and Last_Name.
&lt;br&gt;&amp;gt; &amp;nbsp;I only want the Job_ID to be distinct. One solution that does not work in
&lt;br&gt;&amp;gt; Oracle that was suggested was the query below. &amp;nbsp;I don't know what database
&lt;br&gt;&amp;gt; it does work in.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; SELECT a.Employee_ID, a.Last_Name, b.Job_ID
&lt;br&gt;&amp;gt; FROM (SELECT distinct Last_Name, Employee_ID FROM Employees) a
&lt;br&gt;&amp;gt; RIGHT JOIN
&lt;br&gt;&amp;gt; (SELECT max(Employee_ID) AS Employee_ID, Last_Names, MAX(Job_ID) AS Job_ID
&lt;br&gt;&amp;gt; From Employees
&lt;br&gt;&amp;gt; GROUP BY Last_Name) b
&lt;br&gt;&amp;gt; ON b.Last_Name = a.Last_Name
&lt;br&gt;&amp;gt; ORDER BY Last_Name
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks Much,
&lt;br&gt;&amp;gt; Lewis
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;You've not explained very well what you're trying to do - maybe
&lt;br&gt;&amp;gt; &amp;gt;illustrate it with some dummy data to show the structure you have and
&lt;br&gt;&amp;gt; &amp;gt;the one you want?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;Also, post the non-Oracle solutions you found, and details of the
&lt;br&gt;&amp;gt; &amp;gt;errors you received when trying them.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3245&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3245&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Single-Column-DISTINCT-in-Multiple-Column-SELECT-tp25312250p25369053.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25368541</id>
	<title>Re: Single Column DISTINCT in Multiple Column SELECT</title>
	<published>2009-09-09T09:19:57Z</published>
	<updated>2009-09-09T09:19:57Z</updated>
	<author>
		<name>billingsly</name>
	</author>
	<content type="html">&lt;br&gt;Thank you for responding. &amp;nbsp;What I want to do is very simple, but the solution may not be. &amp;nbsp;Usually, if you use DiSTINCT in a SELECT statement, the recordset returned will give you distinct values for all columns in the SELECT statement: 
&lt;br&gt;&lt;br&gt;SELECT DISTINCT Job_ID, Employee_ID, Last_Name
&lt;br&gt;FROM Employees 
&lt;br&gt;ORDER BY Last_Name
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;This will return distinct values for Job_ID, Employee_ID, and Last_Name. &amp;nbsp;I only want the Job_ID to be distinct. One solution that does not work in Oracle that was suggested was the query below. &amp;nbsp;I don't know what database it does work in.
&lt;br&gt;&lt;br&gt;SELECT a.Employee_ID, a.Last_Name, b.Job_ID &amp;nbsp;
&lt;br&gt;FROM (SELECT distinct Last_Name, Employee_ID FROM Employees) a 
&lt;br&gt;RIGHT JOIN 
&lt;br&gt;(SELECT max(Employee_ID) AS Employee_ID, Last_Names, MAX(Job_ID) AS Job_ID &amp;nbsp;
&lt;br&gt;From Employees
&lt;br&gt;GROUP BY Last_Name) b 
&lt;br&gt;ON b.Last_Name = a.Last_Name
&lt;br&gt;ORDER BY Last_Name
&lt;br&gt;&lt;br&gt;Thanks Much,
&lt;br&gt;Lewis
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt;You've not explained very well what you're trying to do - maybe
&lt;br&gt;&amp;gt;illustrate it with some dummy data to show the structure you have and
&lt;br&gt;&amp;gt;the one you want?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Also, post the non-Oracle solutions you found, and details of the
&lt;br&gt;&amp;gt;errors you received when trying them. 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3244&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3244&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Single-Column-DISTINCT-in-Multiple-Column-SELECT-tp25312250p25368541.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25313663</id>
	<title>RE: Single Column DISTINCT in Multiple Column SELECT</title>
	<published>2009-09-05T17:50:22Z</published>
	<updated>2009-09-05T17:50:22Z</updated>
	<author>
		<name>Joe Graves</name>
	</author>
	<content type="html">&lt;br&gt;This sound like you need to use a &amp;quot;group by&amp;quot; or a &amp;quot;where&amp;quot; clause, rather
&lt;br&gt;than a distinct. &amp;nbsp;However you could do this using a sub select or a temp
&lt;br&gt;table.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: Lewis Billingsley [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25313663&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Billingsly@...&lt;/a&gt;] 
&lt;br&gt;Sent: Saturday, September 05, 2009 4:49 PM
&lt;br&gt;To: sql
&lt;br&gt;Subject: Single Column DISTINCT in Multiple Column SELECT
&lt;br&gt;&lt;br&gt;&lt;br&gt;Hello,
&lt;br&gt;&amp;nbsp; &amp;nbsp;I've been searching for a way in SQL to make one column distinct when
&lt;br&gt;more than one column is listed in the SELECT statement in Oracle. I've seen
&lt;br&gt;solutions on the Internet, but none are for Oracle (if in fact the one's I
&lt;br&gt;saw actuallly work). &amp;nbsp;Is it possible to do this with Oracle?
&lt;br&gt;&lt;br&gt;Thanks Much,
&lt;br&gt;Lewis
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3243&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3243&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Single-Column-DISTINCT-in-Multiple-Column-SELECT-tp25312250p25313663.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25312347</id>
	<title>Re: Single Column DISTINCT in Multiple Column SELECT</title>
	<published>2009-09-05T14:07:28Z</published>
	<updated>2009-09-05T14:07:28Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">&lt;br&gt;You've not explained very well what you're trying to do - maybe
&lt;br&gt;illustrate it with some dummy data to show the structure you have and
&lt;br&gt;the one you want?
&lt;br&gt;&lt;br&gt;Also, post the non-Oracle solutions you found, and details of the
&lt;br&gt;errors you received when trying them.
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3242&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3242&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Single-Column-DISTINCT-in-Multiple-Column-SELECT-tp25312250p25312347.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25312250</id>
	<title>Single Column DISTINCT in Multiple Column SELECT</title>
	<published>2009-09-05T13:49:13Z</published>
	<updated>2009-09-05T13:49:13Z</updated>
	<author>
		<name>billingsly</name>
	</author>
	<content type="html">&lt;br&gt;Hello,
&lt;br&gt;&amp;nbsp; &amp;nbsp;I've been searching for a way in SQL to make one column distinct when more than one column is listed in the SELECT statement in Oracle. I've seen solutions on the Internet, but none are for Oracle (if in fact the one's I saw actuallly work). &amp;nbsp;Is it possible to do this with Oracle?
&lt;br&gt;&lt;br&gt;Thanks Much,
&lt;br&gt;Lewis
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3241&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3241&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Single-Column-DISTINCT-in-Multiple-Column-SELECT-tp25312250p25312250.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25261898</id>
	<title>Is there a way to backup and restore individual schemas only in SQL Server 05/08</title>
	<published>2009-09-02T10:23:05Z</published>
	<updated>2009-09-02T10:23:05Z</updated>
	<author>
		<name>Discover Antartica</name>
	</author>
	<content type="html">&lt;br&gt;Hello All,
&lt;br&gt;Is there a way to backup only tables belonging to a specific schema instead of the entire database in SQL Server 2005 or SQL Server 2008? Also, can I restore only a few tables belonging to a schema instead of restoring all the tables in the database?
&lt;br&gt;&lt;br&gt;Thanks All,
&lt;br&gt;DA
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3240&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3240&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Is-there-a-way-to-backup-and-restore-individual-schemas-only-in-SQL-Server-05-08-tp25261898p25261898.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25261040</id>
	<title>Is there a way to backup and restore individual schemas only in SQL Server 05/08</title>
	<published>2009-09-02T09:34:06Z</published>
	<updated>2009-09-02T09:34:06Z</updated>
	<author>
		<name>Discover Antartica</name>
	</author>
	<content type="html">&lt;br&gt;Hello All,
&lt;br&gt;Is there a way to backup only tables belonging to a specific schema instead of the entire database in SQL Server 2005 or SQL Server 2008? Also, can I restore only a few tables belonging to a schema instead of restoring all the tables in the database?
&lt;br&gt;&lt;br&gt;Thanks All,
&lt;br&gt;DA
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3239&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3239&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/After-Update-Trigger-tp24956497p25261040.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24977364</id>
	<title>Got it</title>
	<published>2009-08-14T12:31:16Z</published>
	<updated>2009-08-14T12:31:16Z</updated>
	<author>
		<name>Nick G-2</name>
	</author>
	<content type="html">&lt;br&gt;Well, I found a solution and I figured I'd share just in case someone else comes looking. It turned out I was able to get away from AFTER UPDATE and made it BEFORE UPDATE: the results are exactly what I was looking for. Here is my new Trigger (Before Update).
&lt;br&gt;&lt;br&gt;&lt;br&gt;DELCARE
&lt;br&gt;&amp;nbsp; PRAGMA AUTONOMOUS_TRANSACTION;
&lt;br&gt;&amp;nbsp; VAL4 &amp;nbsp; FLOAT(40);
&lt;br&gt;BEGIN
&lt;br&gt;&amp;nbsp; VAL4 := (:NEW.VAL1 + :NEW.VAL2+ :NEW.VAL3);
&lt;br&gt;&amp;nbsp; :New.OVERALL_SUM := VAL4; &amp;nbsp; 
&lt;br&gt;END;
&lt;br&gt;&lt;br&gt;&lt;br&gt;One thing to note, I have no idea what PRAGMA AUTONOMOUS_TRANSACTION does...all I know this does what I need it to do. 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3238&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3238&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/After-Update-Trigger-tp24956497p24977364.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24972902</id>
	<title>Re: After Update Trigger</title>
	<published>2009-08-14T07:39:16Z</published>
	<updated>2009-08-14T07:39:16Z</updated>
	<author>
		<name>Nick G-2</name>
	</author>
	<content type="html">&lt;br&gt;Yes, I am using Oracle 9i. Here is the code for the trigger; which compiles.
&lt;br&gt;The table which fires the trigger is called TEMP_DT. 
&lt;br&gt;&lt;br&gt;&lt;br&gt;DECLARE
&lt;br&gt;&amp;nbsp; VAL4 &amp;nbsp; FLOAT(40);
&lt;br&gt;BEGIN
&lt;br&gt;&lt;br&gt;SELECT SUM(VAL1 + VAL2 + VAL3) INTO VAL4
&lt;br&gt;FROM SCHEMA.TEMP_DT
&lt;br&gt;WHERE LOCATION = :OLD.LOCATION
&lt;br&gt;GROUP BY LOCATION;
&lt;br&gt;&lt;br&gt;UPDATE SCHEMA.TEMP_DT
&lt;br&gt;SET OVERALL_SUM = NEW_VAL4
&lt;br&gt;WHERE LOCATION = :OLD.LOCATION;
&lt;br&gt;&lt;br&gt;END; 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3237&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3237&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/After-Update-Trigger-tp24956497p24972902.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24972888</id>
	<title>Re: After Update Trigger</title>
	<published>2009-08-14T07:38:52Z</published>
	<updated>2009-08-14T07:38:52Z</updated>
	<author>
		<name>Nick G-2</name>
	</author>
	<content type="html">&lt;br&gt;Yes, I am using Oracle 9i. Here is the code for the trigger; which compiles.
&lt;br&gt;The table which fires the trigger is called TEMP_DT. 
&lt;br&gt;&lt;br&gt;&lt;br&gt;DECLARE
&lt;br&gt;&amp;nbsp; VAL4 &amp;nbsp; FLOAT(40);
&lt;br&gt;BEGIN
&lt;br&gt;&lt;br&gt;SELECT SUM(VAL1 + VAL2 + VAL3) INTO VAL4
&lt;br&gt;FROM SCHEMA.TEMP_DT
&lt;br&gt;WHERE LOCATION = :OLD.LOCATION
&lt;br&gt;GROUP BY LOCATION;
&lt;br&gt;&lt;br&gt;UPDATE SCHEMA.TEMP_DT
&lt;br&gt;SET OVERALL_SUM = NEW_VAL4
&lt;br&gt;WHERE LOCATION = :OLD.LOCATION;
&lt;br&gt;&lt;br&gt;END; 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3236&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3236&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/After-Update-Trigger-tp24956497p24972888.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24966937</id>
	<title>Re: After Update Trigger</title>
	<published>2009-08-13T23:33:50Z</published>
	<updated>2009-08-13T23:33:50Z</updated>
	<author>
		<name>James Holmes-3</name>
	</author>
	<content type="html">&lt;br&gt;It's Oracle, is indicated by the ORA in the error number.
&lt;br&gt;&lt;br&gt;mxAjax / CFAjax docs and other useful articles:
&lt;br&gt;&lt;a href=&quot;http://www.bifrost.com.au/blog/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.bifrost.com.au/blog/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;2009/8/14 Mike Chabot &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24966937&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mchabot@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You might want to specify which database you are working with. You
&lt;br&gt;&amp;gt; would not get that error in MS SQL Server.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -Mike Chabot
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Thu, Aug 13, 2009 at 10:49 AM, Nick G&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24966937&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moxiewalk@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have a table with four values (val1, val2, val3, overall_val). I have been trying to create a trigger where after an update is made to either one of the first 3 values, the sum is added and updated into the overall_val field [ for each row ]. I can not separate the fields into a different table and I know this is not the best way to show/store a total field but it is what I have to work with. Currently when I try a basic update after trigger I get the ORA-04091 is a mutating trigger error because the :new.val has not been committed. Does anyone know of a work around to update a row in the same table that fired the trigger? Thanks in advance.
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3235&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3235&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/After-Update-Trigger-tp24956497p24966937.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24960583</id>
	<title>Re: After Update Trigger</title>
	<published>2009-08-13T12:03:58Z</published>
	<updated>2009-08-13T12:03:58Z</updated>
	<author>
		<name>Mike Chabot</name>
	</author>
	<content type="html">&lt;br&gt;You might want to specify which database you are working with. You
&lt;br&gt;would not get that error in MS SQL Server.
&lt;br&gt;&lt;br&gt;-Mike Chabot
&lt;br&gt;&lt;br&gt;On Thu, Aug 13, 2009 at 10:49 AM, Nick G&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24960583&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;moxiewalk@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a table with four values (val1, val2, val3, overall_val). I have been trying to create a trigger where after an update is made to either one of the first 3 values, the sum is added and updated into the overall_val field [ for each row ]. I can not separate the fields into a different table and I know this is not the best way to show/store a total field but it is what I have to work with. Currently when I try a basic update after trigger I get the ORA-04091 is a mutating trigger error because the :new.val has not been committed. Does anyone know of a work around to update a row in the same table that fired the trigger? Thanks in advance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3234&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3234&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/After-Update-Trigger-tp24956497p24960583.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24956497</id>
	<title>After Update Trigger</title>
	<published>2009-08-13T07:49:40Z</published>
	<updated>2009-08-13T07:49:40Z</updated>
	<author>
		<name>Nick G-2</name>
	</author>
	<content type="html">&lt;br&gt;I have a table with four values (val1, val2, val3, overall_val). I have been trying to create a trigger where after an update is made to either one of the first 3 values, the sum is added and updated into the overall_val field [ for each row ]. I can not separate the fields into a different table and I know this is not the best way to show/store a total field but it is what I have to work with. Currently when I try a basic update after trigger I get the ORA-04091 is a mutating trigger error because the :new.val has not been committed. Does anyone know of a work around to update a row in the same table that fired the trigger? Thanks in advance. 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3233&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3233&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/After-Update-Trigger-tp24956497p24956497.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24184732</id>
	<title>Advanced AND and OR query</title>
	<published>2009-06-24T06:15:12Z</published>
	<updated>2009-06-24T06:15:12Z</updated>
	<author>
		<name>Bart Buijze</name>
	</author>
	<content type="html">&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;For quite a simple table-structure, ie. Person, Criteria, and PersonCriteria (the combi-table), I have set up a query at the moment that selects alle persons that possess all selected criteria. The query itself looks like this at the moment:
&lt;br&gt;&lt;br&gt;Select p.PersonID
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; From Person p,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Select Distinct PersonID, CriteriaID
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; From PersonCriteria
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Where CriteriaID in (#arguments.criteriaIDs#)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ) k
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Where p.PersonID= k.PersonID
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Group BY p.PersonID
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Having Count(*) = #Listlen(arguments.criteriaIDs)#
&lt;br&gt;&lt;br&gt;sofar no problem and everything works fine.
&lt;br&gt;&lt;br&gt;Now I want to offer the possibility for the user to add some AND and OR variables in their search, ie. someone could say: I'm looking for a person that possesses: Criteria 1 AND 3 AND 4 (which would be covered by the query above) AND (5 OR 6) AND (8 OR 9) etc....
&lt;br&gt;&lt;br&gt;I'm not sure where to start with this additional level. I hope someone else does..:-)
&lt;br&gt;&lt;br&gt;thanks!
&lt;br&gt;Bart
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3232&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3232&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Advanced-AND-and-OR-query-tp24184732p24184732.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23782670</id>
	<title>Re: Top N rows not working - Access / CF7</title>
	<published>2009-05-29T08:59:57Z</published>
	<updated>2009-05-29T08:59:57Z</updated>
	<author>
		<name>Scott Doc</name>
	</author>
	<content type="html">&lt;br&gt;Distinct?? Interesting.. why hadn't I thought of that :) Thanks Maya!
&lt;br&gt;No, actually I ended up solving it another way. I just added a few more keyIDs in the order by clause. It seemed to work even thought those fields were not appearing in the select statement. I'm posting here for anyone else having a similar problem.
&lt;br&gt;&lt;br&gt;And no, they're not real table names. I thought it wise to alias them on a public forum. And as for migrating from Access... yes.. a long term goal, certainly. But not really my decision at the moment. thanks anyway. 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3231&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3231&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Top-N-rows-not-working---Access---CF7-tp23690450p23782670.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23772419</id>
	<title>Re: consume a web service from a stored procedure</title>
	<published>2009-05-28T17:26:34Z</published>
	<updated>2009-05-28T17:26:34Z</updated>
	<author>
		<name>listman</name>
	</author>
	<content type="html">&lt;br&gt;Why not run a DTS/SSIS job from a stored proc that hits a 
&lt;br&gt;webpage/webservice?
&lt;br&gt;&lt;br&gt;Cameron Johnson wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi, all.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm trying to hit a remote web service from within a SQL stored procedure. I don't need any data back; it's just a call to initiate another process.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If I were doing this in CF, it would be:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;cfinvoke webservice=&amp;quot;&lt;a href=&quot;http://www.domain.com/webservices/webservice.asmx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.domain.com/webservices/webservice.asmx&lt;/a&gt;&amp;quot; method=&amp;quot;AddUser&amp;quot; ID=&amp;quot;#ID# /&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there a way to do this from within a stored procedure? I've seen some examples using sp_OACreate and sp_OAMethod, but it seems overkill for what I'm trying to accomplish. And, I'm having a hard time deconstructing the MSDN documentation. 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for the help/tips/info/other.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cameron
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3230&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3230&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/consume-a-web-service-from-a-stored-procedure-tp23768478p23772419.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23771259</id>
	<title>Re: consume a web service from a stored procedure</title>
	<published>2009-05-28T15:21:16Z</published>
	<updated>2009-05-28T15:21:16Z</updated>
	<author>
		<name>Cameron Johnson</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; Submit to your action page, send the form struct into the function.
&lt;br&gt;&lt;br&gt;I don't have access to the form or the action page. Those are part of the proprietary, third-party software that runs our e-commerce. What I can do is add pre- and post-process SPs to validate data, fire off other SPs, etc.
&lt;br&gt;&lt;br&gt;Being a CF developer first, I'd prefer to create a CFC or a simple CFM page to do the web service call. But the higher problem still exists: what do I put into the SP to initiate the call? Or, put differently, how do I communicate to a web app from an SP?
&lt;br&gt;&lt;br&gt;More searching turned up this example:
&lt;br&gt;&lt;a href=&quot;http://blog.davebouwman.com/index.php/2008/07/call-geonames-web-services-from-a-sql-stored-procedure/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blog.davebouwman.com/index.php/2008/07/call-geonames-web-services-from-a-sql-stored-procedure/&lt;/a&gt;&lt;br&gt;&lt;br&gt;I was hoping someone on this list had done something similar.
&lt;br&gt;&lt;br&gt;Cameron
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3229&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3229&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/consume-a-web-service-from-a-stored-procedure-tp23768478p23771259.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23771248</id>
	<title>Re: consume a web service from a stored procedure</title>
	<published>2009-05-28T15:20:16Z</published>
	<updated>2009-05-28T15:20:16Z</updated>
	<author>
		<name>Cameron Johnson</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;I don't get the problem. Create a Service Object (CFC) with a function that 
&lt;br&gt;&amp;gt;handles this process.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Submit to your action page, send the form struct into the function. Inside 
&lt;br&gt;&amp;gt;the function, call the stored procedure &amp; pass in the form data. Have the 
&lt;br&gt;&amp;gt;SP return the new ID and a bit value indicating that this is a new record. 
&lt;br&gt;&amp;gt;If you call the web service when a new record is created, then do that, 
&lt;br&gt;&amp;gt;otherwise, skip it and return a boolean value or the ID from the new record 
&lt;br&gt;&amp;gt;from the function to whatever process called the function.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;-- Adrian
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I wish I could. But the application that is processing the request is (a) a 
&lt;br&gt;&amp;gt;closed, third-party app that is (b) written in .NET.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;What we do have control over is the validation stored procedure that occurs 
&lt;br&gt;&amp;gt;after a person submits the form. The SP is doing normal database logic 
&lt;br&gt;&amp;gt;first - check for duplicate records in table X, add a new row to table Y, 
&lt;br&gt;&amp;gt;etc.. When all that's done, I need to fire a quick request to the remote 
&lt;br&gt;&amp;gt;web service. 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Cameron
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Huh?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Stored procedures are for database logic, not web application logic
&lt;br&gt;&amp;gt;&amp;gt;(which is what this appears to be).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;Do it in CF. 
&lt;/div&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3228&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3228&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/consume-a-web-service-from-a-stored-procedure-tp23768478p23771248.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23770609</id>
	<title>Re: consume a web service from a stored procedure</title>
	<published>2009-05-28T14:36:39Z</published>
	<updated>2009-05-28T14:36:39Z</updated>
	<author>
		<name>OLHAUSJ</name>
	</author>
	<content type="html">&lt;br&gt;You could have the stored proc write a row to a table, and run a CF 
&lt;br&gt;scheduled task every few minutes to look for that row. &amp;nbsp;When it finds it, 
&lt;br&gt;have the scheduled task send the web service request.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;From:
&lt;br&gt;Cameron Johnson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23770609&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;johnson@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To:
&lt;br&gt;sql &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23770609&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sql@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Date:
&lt;br&gt;05/28/2009 04:05 PM
&lt;br&gt;Subject:
&lt;br&gt;Re: consume a web service from a stored procedure
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;I wish I could. But the application that is processing the request is (a) 
&lt;br&gt;a closed, third-party app that is (b) written in .NET.
&lt;br&gt;&lt;br&gt;What we do have control over is the validation stored procedure that 
&lt;br&gt;occurs after a person submits the form. The SP is doing normal database 
&lt;br&gt;logic first - check for duplicate records in table X, add a new row to 
&lt;br&gt;table Y, etc.. When all that's done, I need to fire a quick request to the 
&lt;br&gt;remote web service. 
&lt;br&gt;&lt;br&gt;Cameron
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt;Huh?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Stored procedures are for database logic, not web application logic
&lt;br&gt;&amp;gt;(which is what this appears to be).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Do it in CF. 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3227&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3227&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/consume-a-web-service-from-a-stored-procedure-tp23768478p23770609.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23770550</id>
	<title>Re: consume a web service from a stored procedure</title>
	<published>2009-05-28T14:32:09Z</published>
	<updated>2009-05-28T14:32:09Z</updated>
	<author>
		<name>Adrian Moreno</name>
	</author>
	<content type="html">&lt;br&gt;I don't get the problem. Create a Service Object (CFC) with a function that 
&lt;br&gt;handles this process.
&lt;br&gt;&lt;br&gt;Submit to your action page, send the form struct into the function. Inside 
&lt;br&gt;the function, call the stored procedure &amp; pass in the form data. Have the 
&lt;br&gt;SP return the new ID and a bit value indicating that this is a new record. 
&lt;br&gt;If you call the web service when a new record is created, then do that, 
&lt;br&gt;otherwise, skip it and return a boolean value or the ID from the new record 
&lt;br&gt;from the function to whatever process called the function.
&lt;br&gt;&lt;br&gt;-- Adrian
&lt;br&gt;&lt;br&gt;----------------------------------------
&lt;br&gt;From: &amp;quot;Cameron Johnson&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23770550&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;johnson@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Thursday, May 28, 2009 4:05 PM
&lt;br&gt;To: &amp;quot;sql&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23770550&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sql@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Subject: Re: consume a web service from a stored procedure 
&lt;br&gt;&lt;br&gt;I wish I could. But the application that is processing the request is (a) a 
&lt;br&gt;closed, third-party app that is (b) written in .NET.
&lt;br&gt;&lt;br&gt;What we do have control over is the validation stored procedure that occurs 
&lt;br&gt;after a person submits the form. The SP is doing normal database logic 
&lt;br&gt;first - check for duplicate records in table X, add a new row to table Y, 
&lt;br&gt;etc.. When all that's done, I need to fire a quick request to the remote 
&lt;br&gt;web service. 
&lt;br&gt;&lt;br&gt;Cameron
&lt;br&gt;&lt;br&gt;&amp;gt;Huh?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Stored procedures are for database logic, not web application logic
&lt;br&gt;&amp;gt;(which is what this appears to be).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Do it in CF. 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3226&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3226&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/consume-a-web-service-from-a-stored-procedure-tp23768478p23770550.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23770118</id>
	<title>Re: consume a web service from a stored procedure</title>
	<published>2009-05-28T14:00:15Z</published>
	<updated>2009-05-28T14:00:15Z</updated>
	<author>
		<name>Cameron Johnson</name>
	</author>
	<content type="html">&lt;br&gt;I wish I could. But the application that is processing the request is (a) a closed, third-party app that is (b) written in .NET.
&lt;br&gt;&lt;br&gt;What we do have control over is the validation stored procedure that occurs after a person submits the form. The SP is doing normal database logic first - check for duplicate records in table X, add a new row to table Y, etc.. When all that's done, I need to fire a quick request to the remote web service. 
&lt;br&gt;&lt;br&gt;Cameron
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt;Huh?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Stored procedures are for database logic, not web application logic
&lt;br&gt;&amp;gt;(which is what this appears to be).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Do it in CF. 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3225&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3225&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/consume-a-web-service-from-a-stored-procedure-tp23768478p23770118.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23769766</id>
	<title>Re: consume a web service from a stored procedure</title>
	<published>2009-05-28T13:44:58Z</published>
	<updated>2009-05-28T13:44:58Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">&lt;br&gt;Huh?
&lt;br&gt;&lt;br&gt;Stored procedures are for database logic, not web application logic
&lt;br&gt;(which is what this appears to be).
&lt;br&gt;&lt;br&gt;Do it in CF.
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3224&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3224&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/consume-a-web-service-from-a-stored-procedure-tp23768478p23769766.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23768906</id>
	<title>Re: consume a web service from a stored procedure</title>
	<published>2009-05-28T12:52:13Z</published>
	<updated>2009-05-28T12:52:13Z</updated>
	<author>
		<name>Cameron Johnson</name>
	</author>
	<content type="html">&lt;br&gt;As a follow-up, I can also hit the web service with an HTTP GET request:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.domain.com/webservices/webservice.asmx/AddUser?ID=#ID#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.domain.com/webservices/webservice.asmx/AddUser?ID=#ID#&lt;/a&gt;&lt;br&gt;&lt;br&gt;Is there a straightforward way of doing this in an SP?
&lt;br&gt;&lt;br&gt;Cameron
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi, all.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm trying to hit a remote web service from within a SQL stored 
&lt;br&gt;&amp;gt; procedure. I don't need any data back; it's just a call to initiate 
&lt;br&gt;&amp;gt; another process.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If I were doing this in CF, it would be:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;lt;cfinvoke webservice=&amp;quot;&lt;a href=&quot;http://www.domain.com/webservices/webservice&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.domain.com/webservices/webservice&lt;/a&gt;.
&lt;br&gt;&amp;gt; asmx&amp;quot; method=&amp;quot;AddUser&amp;quot; ID=&amp;quot;#ID# /&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is there a way to do this from within a stored procedure? I've seen 
&lt;br&gt;&amp;gt; some examples using sp_OACreate and sp_OAMethod, but it seems overkill 
&lt;br&gt;&amp;gt; for what I'm trying to accomplish. And, I'm having a hard time 
&lt;br&gt;&amp;gt; deconstructing the MSDN documentation. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks for the help/tips/info/other.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Cameron
&lt;/div&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3223&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3223&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/consume-a-web-service-from-a-stored-procedure-tp23768478p23768906.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23768478</id>
	<title>consume a web service from a stored procedure</title>
	<published>2009-05-28T12:25:12Z</published>
	<updated>2009-05-28T12:25:12Z</updated>
	<author>
		<name>Cameron Johnson</name>
	</author>
	<content type="html">&lt;br&gt;Hi, all.
&lt;br&gt;&lt;br&gt;I'm trying to hit a remote web service from within a SQL stored procedure. I don't need any data back; it's just a call to initiate another process.
&lt;br&gt;&lt;br&gt;If I were doing this in CF, it would be:
&lt;br&gt;&lt;br&gt;&amp;lt;cfinvoke webservice=&amp;quot;&lt;a href=&quot;http://www.domain.com/webservices/webservice.asmx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.domain.com/webservices/webservice.asmx&lt;/a&gt;&amp;quot; method=&amp;quot;AddUser&amp;quot; ID=&amp;quot;#ID# /&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Is there a way to do this from within a stored procedure? I've seen some examples using sp_OACreate and sp_OAMethod, but it seems overkill for what I'm trying to accomplish. And, I'm having a hard time deconstructing the MSDN documentation. 
&lt;br&gt;&lt;br&gt;Thanks for the help/tips/info/other.
&lt;br&gt;&lt;br&gt;Cameron
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3222&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3222&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/consume-a-web-service-from-a-stored-procedure-tp23768478p23768478.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23724510</id>
	<title>Re: Top N rows not working - Access / CF7</title>
	<published>2009-05-26T07:41:22Z</published>
	<updated>2009-05-26T07:41:22Z</updated>
	<author>
		<name>Maya Tulchinsky</name>
	</author>
	<content type="html">&lt;br&gt;Have you tried to use &amp;quot;distinct&amp;quot;?
&lt;br&gt;&lt;br&gt;--- On Sat, 5/23/09, Scott Doc &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23724510&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;scott@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;From: Scott Doc &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23724510&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;scott@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Subject: Re: Top N rows not working - Access / CF7
&lt;br&gt;To: &amp;quot;sql&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=23724510&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sql@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Date: Saturday, May 23, 2009, 9:22 PM
&lt;br&gt;&lt;br&gt;&lt;br&gt;I spoke too soon.
&lt;br&gt;I was wrong.
&lt;br&gt;&lt;br&gt;It STILL doesn't work. I was testing with a maxrows=&amp;quot;200&amp;quot; (my query returns roughly 2000 rows)
&lt;br&gt;&lt;br&gt;NOW it returns two rows, regardless of if they are the same or not. It's like it just ignores the &amp;quot;TOP 1&amp;quot; 
&lt;br&gt;&lt;br&gt;(I also tried putting the 1 in quotes &amp;quot;Top (1)&amp;quot; .. that was a syntax error) 
&lt;br&gt;&lt;br&gt;This is my error message.. please help! 
&lt;br&gt;&lt;br&gt;Diagnostic: Error Executing Database Query. [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] At most one record can be returned by this subquery. 
&lt;br&gt;The error occurred on line 307.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3221&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3221&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Top-N-rows-not-working---Access---CF7-tp23690450p23724510.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23695645</id>
	<title>Re: Top N rows not working - Access / CF7</title>
	<published>2009-05-24T09:51:57Z</published>
	<updated>2009-05-24T09:51:57Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">&lt;br&gt;Please tell me that those are not real table names!?!
&lt;br&gt;Without knowing what you're trying to do with the query, it's hard to give
&lt;br&gt;advice on how to correct the SQL.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Eitherway, my advice would be stop using Microsoft Access, and pick *any*
&lt;br&gt;other database system out there.
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3220&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3220&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Top-N-rows-not-working---Access---CF7-tp23690450p23695645.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23690530</id>
	<title>Re: Top N rows not working - Access / CF7</title>
	<published>2009-05-23T21:22:21Z</published>
	<updated>2009-05-23T21:22:21Z</updated>
	<author>
		<name>Scott Doc</name>
	</author>
	<content type="html">&lt;br&gt;I spoke too soon.
&lt;br&gt;I was wrong.
&lt;br&gt;&lt;br&gt;It STILL doesn't work. I was testing with a maxrows=&amp;quot;200&amp;quot; (my query returns roughly 2000 rows)
&lt;br&gt;&lt;br&gt;NOW it returns two rows, regardless of if they are the same or not. It's like it just ignores the &amp;quot;TOP 1&amp;quot; 
&lt;br&gt;&lt;br&gt;(I also tried putting the 1 in quotes &amp;quot;Top (1)&amp;quot; .. that was a syntax error) 
&lt;br&gt;&lt;br&gt;This is my error message.. please help! 
&lt;br&gt;&lt;br&gt;Diagnostic: Error Executing Database Query. [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] At most one record can be returned by this subquery. 
&lt;br&gt;The error occurred on line 307.
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3219&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3219&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Top-N-rows-not-working---Access---CF7-tp23690450p23690530.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23690497</id>
	<title>Re: Top N rows not working - Access / CF7</title>
	<published>2009-05-23T21:14:21Z</published>
	<updated>2009-05-23T21:14:21Z</updated>
	<author>
		<name>Scott Doc</name>
	</author>
	<content type="html">&lt;br&gt;Hello Me, Yes I found a solution for myself. So for any others that have this problem, simply add a &amp;quot;Group By&amp;quot; 
&lt;br&gt;&lt;br&gt;So now:
&lt;br&gt;&lt;br&gt;SELECT TOP 1 Tbl1.Name
&lt;br&gt;From (((T2 INNER JOIN T3 ON T2.AID = T3.AID)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INNER JOIN T4 ON T3.T4ID = T4.T4ID) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INNER JOIN Tbl1 ON T4.PgID = Tbl1.PgID)
&lt;br&gt;WHERE (T2.photoID = #GetResults.photoID#)
&lt;br&gt;GROUP BY T2.T2ID, Tbl1.Name
&lt;br&gt;ORDER BY T2.T2ID
&lt;br&gt;&lt;br&gt;Any idea why this is? Didn't really seem like an obvious solution to me, but there you go. 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists
&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3218&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3218&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/sql/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/sql/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.6&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Top-N-rows-not-working---Access---CF7-tp23690450p23690497.html" />
</entry>

</feed>
