Hi,
How can I dynamically get value of columnlist.
I need to port data from MySql to MS SQL DB. This is what I am trying to do;
<cfset InsValueList="">
<cfquery name="getTables" datasource="db1">
show tables
</cfquery>
<cfloop query="getTables">
<cfquery name="Selec" datasource"db1">
Select * from #tablename#
</cfquery>
<cfset InsValueList=Selec.columnlist>
<cfset InsValueList=Replace(InsValueList,",","##,##Selec.","ALL")>
<cfset InsValueList="##Selec." & InsValueList & "##">
<cfoutput query="selec">
<cfquery name="Selec1" datasource="#dbname#" dbtype="query">
INSERT INTO #tablename# values(#Evaluate("Selec.columnlist")#)
</cfquery>
</cfoutput>
</cfloop>
"INSERT INTO #tablename# values(#Evaluate("Selec.columnlist")#)", this doesn't
work as it doen't evaluate column values
how can i get column values to insert the values into table
Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219216
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54