Yeah that too... I didn't notice the quotes.. Please clean up the query. Understand that the basic SQL statement is select column from table where column_value = "some_value" and column_value != "some_other_value"
if you put quotes in your select statement, you're asking for a literal value.. IE.. Select "CAR" from dual will return "CAR" On Mon, 22 Nov 2004 15:49:31 -0400, alysia brown <[EMAIL PROTECTED]> wrote: > Here's my code. I get an error (shown below) and I can't figure out what I am > doing wrong. > > I have two tables that are combined by the common PROG_REC_ID field and want > the output to show up only if the two latter conditions are met. > > <cfquery name="Programs" datasource="#dsn#" username="#dbuser#" > > > select "PROGRAMS.PROG_EMPH_ID, > PROG_RELATED_LINKS.PROG_RL_DESCRIPTION, > > PROG_RELATED_LINKS.PROG_RL_LINK, > PROG_RELATED_LINKS.PROG_REC_ID, PROG_RELATED_LINKS.PROG_LINK_LKUP_REC_ID, > PROGRAMS.PROG_REC_ID" > > from #dbuser#.PROGRAMS, #dbuser#.PROG_RELATED_LINKS > > where PROGRAMS.PROG_REC_ID = > PROG_RELATED_LINKS.PROG_REC_ID > > where PROGRAMS.prog_emph_id = 1 > > where > PROG_RELATED_LINKS.PROG_LINK_LKUP_REC_ID = 3 > > </cfquery> > > <cfoutput> > > #PROG_RELATED_LINKS.PROG_RL_DESCRIPTION# > > </cfoutput> > > Error Message: > > Error Executing Database Query. > > [Macromedia][Oracle JDBC Driver][Oracle]ORA-00972: identifier is too long > > The error occurred in > /home/httpd/web-dev/www/newsroom/news/ag_biosecurity/testing.cfm: line 14 > > 12 : select "PROGRAMS.PROG_EMPH_ID, > PROG_RELATED_LINKS.PROG_RL_DESCRIPTION, > 13 : PROG_RELATED_LINKS.PROG_RL_LINK, > PROG_RELATED_LINKS.PROG_REC_ID, PROG_RELATED_LINKS.PROG_LINK_LKUP_REC_ID, > PROGRAMS.PROG_REC_ID" > 14 : from #dbuser#.PROGRAMS, #dbuser#.PROG_RELATED_LINKS > 15 : where PROGRAMS.PROG_REC_ID = > PROG_RELATED_LINKS.PROG_REC_ID > 16 : where PROGRAMS.prog_emph_id = 1 > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:15:492 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
