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 |
|
jaford
Starting Member
14 Posts |
Posted - 2001-09-10 : 14:43:12
|
| I am trying to create and insert values into a temp table....however I get an "Invalid Object Name" when I try to insert values. below is my code:sqlstr = "Create table #results([e1] int NULL, [e2] varchar(50) null)"cn.Execute sqlstrDo Until rs.EOFsqlstr = "Insert Into #results(e1,e2) Select '" & rs(0) & "' as e1, '" &rs(1) & "' as e2;"cn.Execute sqlstrrs.MoveNextLooprs.Closesqlstr = "select * from #results order by e1"rs.Open sqlstr, cn, adOpenForwardOnly, adLockReadOnlyDo Until rs.EOF Debug.Print rs(0) & " " & rs(1)rs.MoveNextLoopAny ideas? THANKS! |
|
|
|
|
|