Yeah, aliasing is great.. allows for much more readible code.
On Mon, 22 Nov 2004 13:59:37 -0700, Ben Sauer <[EMAIL PROTECTED]> wrote: > Everything red is an issue. But for convenience you should take advantage of > an > Oracle trick called aliasing. Select a.num, b.tax, c.red from > "PROD_FIELD_TABLE_ONE" a, "PROB_FILED_TABLET_ONE" b, "PROBL_FLIED_LABTEST_ONE" > c > is much more readable than > > Select "PROD_FIELD_TABLE_ONE".num, "PROB_FILED_TABLET_ONE".tax, > "PROBL_FLIED_LABTEST_ONE".red from "PROD_FIELD_TABLE_ONE", > "PROB_FILED_TABLET_ONE", "PROBL_FLIED_LABTEST_ONE" > > >>> [EMAIL PROTECTED] 11/22/2004 12:49:31 PM >>> > Heres my code. I get an error (shown below) and I cant 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> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:493 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
