Inserts an element into a query at the indicate position. Elements with equal or greater positions are incremented by one.
Returns the updated query with the element inserted.
queryInsertAt(query,value,position)
→ returns query
query.InsertAt(value,position)
This is Example1
qry=queryNew("rowid,name", "integer,varchar",[ [1, "Jay"],[2, "Bob"],[3, "Theodore"],[4, "William"] ]);
rufus=QueryNew("rowid,name","integer,varchar",[[42,"Rufus"]]);
queryInsertAt(qry,rufus,3);
WriteDump(qry);
Using the member function.
qry=queryNew("rowid,name", "integer,varchar",[ [1, "Jay"],[2, "Bob"],[3, "Theodore"],[4, "William"] ]);
rufus=QueryNew("rowid,name","integer,varchar",[[42,"Rufus"]]);
qry.InsertAt(rufus,3);
WriteDump(qry);
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.