Viewing 15 posts - 46 through 60 (of 397 total)
One way to workaround
declare @DBName varchar(200)
set @DBName = 'northwind'
if @DBName = 'pubs'
use pubs
else
use northwind
select count(*) tbno, db_name() from sysobjects where xtype = 'u'
April 6, 2005 at 5:00 am
try isqlw.
You can change default session setting by making changes in sql query analyzer.
April 5, 2005 at 6:10 pm
I believe timestamp is row based, each row in a table has its unique value. So select "all rows with a 'timestamp' column greater than a specific value" would not...
April 5, 2005 at 5:38 pm
Trigger fire data to staging table.
A scheduled job try the linked server, if connected, delete the data from the staging table.
April 4, 2005 at 6:59 pm
try
grant select,insert,update,delete,references on <mytable> to <myuser>
April 4, 2005 at 12:57 am
it works fine.
Exec has it own session. If you expect (Rest of script goes here...) to be the same session as Exec. put them together.
e.g.
DECLARE @DBName NVARCHAR (30),...
April 4, 2005 at 12:16 am
alter database modify file to change physical name only works on tempdb.
For others database detach and attach is a option.
sp_detach_db
rename the physical file
sp_attachdb with physical file specified.
April 1, 2005 at 4:55 pm
alter database with MODIFY FILE option.
Check BOL for detail syntax.
April 1, 2005 at 7:17 am
Try later. It seems something is going on which stops your command.
April 1, 2005 at 5:47 am
use dynamic sql to do this in global cursor (default).
part of code would look like:
declare @cursorsql varchar(4000)
select @cursorsql =
'DECLARE mycursor CURSOR FOR '+
'SELECT bignr, teller, zin, sleutel, coderij, dampen1, dampen2,...
April 1, 2005 at 5:38 am
Possible, install an instance with specified Sort Order.
Collation settings in Setup of BOL describes the detail.
April 1, 2005 at 5:29 am
One can get column name from systable. Use sql to generate sql statement, then run the generated statement.
Example; find which varchar fields in authors (pubs database) has value of 'White'
select...
April 1, 2005 at 4:57 am
select 'col1name' where exists(select * from tbname where col1name = intvalue)
union
select 'col2name' where exists(select * from tbname where col2name = intvalue)
..
..
March 31, 2005 at 11:16 pm
Viewing 15 posts - 46 through 60 (of 397 total)