> if you can't use the var to refer directly to an object...
> could you
> backdoor it and just use the var in a subselect? I know it
> looks a
> little redundant: (select name from names where name =
> 'ken'), but it
> seems like you may be able to fake the funk.

> (I forget what the 'obj' table is in SQL Server, but...)
> Kind of like: drop table (select object_name from obj
> where object_name
> = @crDataTable)

> That way it's representing an object indirectly??? I have
> no idea if
> this will work, it's just the first thing that popped to
> mind after
> reading Isaac's post.

You know, I've never tried that with SQL Server... It doesn't seem
like the sort of feature they would have implemented, though I could
be wrong.

> I've not worked with SQL Server much in the last couple of
> years, but
> couldn't you do something like that? Also, are you doing
> this from a web
> app? If so, why not just assign the table name to a cf
> variable and do
> the drop table in a cfquery? 2 queries; get the table name
> in the first;
> set it to a cf var and then drop the table in the second.

Yeah, I typically do it with CF -- although I'll bet he already had
the table name, so he wouldn't have needed a 2nd query... but
occasionally I run into a task that's just easier to deal with in
Query Analyzer -- for instance here we have 2 servers and each server
has a couple dozen db's all with the same structure (mostly anyway)
and so when we make application changes, we need to propogate new
tables, columns, etc. to all the databases. I created a set of stored
procedures that propogate objects across the db's which use syntax
like this. That way I don't need a lot of CF code to handle keeping
our schemas updated, I just run sp_propogateView 'viewname',
sp_propogateTable 'tablename' or sp_propogateColumn 'tablename'
'column'. These gather the necessary meta-data from the
information_schema or system tables in our prototype project database
and push them out to the other projects. I know you can create objects
in any new db's by using the Model database in SQL server, but we're
using this for a lot of existing db's, so that's why we have to
propogate them.


s. isaac dealey   954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205667
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

Reply via email to