At 03:51 PM 1/9/2003 -0600, you wrote: >INSERT INTO tbOptions (tbQuestionsFK, Value, supplementalValue1, >supplementalValue2) >SELECT 20 AS tbQuestionsFK, tbContentClassifications.id, >tbContentClassifications.name, tbContentClassifications.description >FROM tbContentClassifications >where tbContentClassifications.tablePK >= 5 >AND tbContentClassifications.tablePK <=23 > >"syntax error in INSERT INTO statement" > >tried it, but I still had that extra column on there before, took it off and >still errors. Have also tried a semicolon at the end of the statement.
I was going to say, you had different numbers of columns there, but you seem to have fixed it... Oh I think I see it now. Ditch the "as tbQuestionsFK" in the SELECT. You're wanting to put the value '20' in all your inserted rows, right? You don't need to refer to it with an 'as (fieldname)'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=6 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=6 Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
