5 Years
Discussion Span
Last Post by adam_k

I have a table that has "name" as columnname1 and "age" as columnname2. so my inputs are "gerry" and "25". I want "gerry" to be a column name of the other table.


You can write the create table statement as a string, concatenating or adding as a parameter the name "gerry" where appropriate and then execute it as a nonquery from VB or send the specs to a sproc in SQL that will do the same and use exec(string) to get the same result.

The question is why would you have a column with a name that you don't really know? Won't this make your life a lot harder trying to query or whatever?
Can you please explain what you are building and why this column has to be named after name?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.