RE: Creating update statements on the fly

2002-04-02 Thread Jerry Staple
: Creating update statements on the fly HI, I wanted to create a Update statement on the fly. For creating a Select statement on the fly I have used Select * from tablename Where 0=0 cfif isDefined(attributes.String1) and String1 = attributes.String1 /cfif How can I

Creating update statements on the fly

2002-03-29 Thread Chakka, Sudheer
HI, I wanted to create a Update statement on the fly. For creating a Select statement on the fly I have used Select * from tablename Where 0=0 cfif isDefined(attributes.String1) and String1 = attributes.String1 /cfif How can I achieve this for update statement as

Re: Creating update statements on the fly

2002-03-29 Thread Rick Walters
There's always the ASP way... !--- build the query --- cfset sql=update tablename set cfif condition1... cfset sql=#sql# columname=value /cfif cfif condition2... cfset sql=#sql# where columname = 1 /cfif cfquery name=myquery datasource=#dsn# #sql# /cfquery Good Fortune, Richard