Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
zang
Starting Member
14 Posts |
Posted - 2007-03-12 : 19:42:10
|
How can i execute an attribute who contain an sql sentence?Example:Table_reportsReportNumber: integerQuery: Varchar (2000)The query attribute must contain an sql sentence, for example “select * from client”.How can I execute the query attribute in transact sql?.Thanks in advance,Ariel. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-03-12 : 19:59:08
|
Your question is not very clear and smells of homework. SELECT * FROM Table_reportsTara Kizer |
 |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-03-12 : 20:24:05
|
quote: Originally posted by zang...How can I execute the query attribute in transact sql?...
You could try the EXECUTE statement.CODO ERGO SUM |
 |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2007-03-13 : 12:11:33
|
Soemthing like:DECLARE @Sql VARCAHR(2000)SELECT @Sql = QueryFROM Table_reportsWHERE ReportNumer = 5EXEC @Sql -Ryan |
 |
|
|
|
|