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 |
|
tomino79
Starting Member
13 Posts |
Posted - 2005-12-02 : 03:22:47
|
| hi all,I thought that I am really good in T-SQL and because I Have certificates in SQL Server. But this problem is for me a big X-File.I dont know why, or how, but it doesnt not work and I does not understand why... ?drop table aa /* if the table exists */create table aa ( i int )insert into aa ( i ) values ( 0 )insert into aa ( i ) values ( 1 )alter table aa add j intinsert into aa ( i,j ) values ( 0,1 ) /* here !! error that "j" doesnt exists */Can anybody help me ?T. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-02 : 03:28:17
|
| You need to use the command GOdrop table aa /* if the table exists */create table aa ( i int )insert into aa ( i ) values ( 0 )insert into aa ( i ) values ( 1 )GOalter table aa add j intGOinsert into aa ( i,j ) values ( 0,1 ) /* here !! error that "j" doesnt exists */MadhivananFailing to plan is Planning to fail |
 |
|
|
tomino79
Starting Member
13 Posts |
Posted - 2005-12-02 : 03:35:20
|
| Yes but Command GO I cant use in ADO. GO is internal for SQL Query Analyzer |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-02 : 03:39:48
|
| Cant use use Alter..;Go;Insert....?MadhivananFailing to plan is Planning to fail |
 |
|
|
tomino79
Starting Member
13 Posts |
Posted - 2005-12-02 : 03:44:24
|
Yes in ADOCommand.Text you can't use "GO" quote: Originally posted by madhivanan Cant use use Alter..;Go;Insert....?MadhivananFailing to plan is Planning to fail
|
 |
|
|
|
|
|