Henry,
you say you are comparing number of rows with rowcount in the properties form of the table.
The properties form uses the value found in the sysinexes table. this can NOT be guaranteed to be up to date.
if you wish to use this value then you must ensure the sysindexes table is updated...
Viruland,
you need to enclose the date in quotes
try the following changes
1) SET @Query = @Query + ' AND (GeplAfhDatum < ''' + GetDate() + '''))'
2) SET @Query = @Query + ' AND (GeplAfhDatum < ''' + DateAdd("d", 90, GetDate())+ '''))'
Glyndwr
travis,
I've just spotted this article, I have not tried it but it may be what you're looking for
http://www.sqlmag.com/Forums/messageview.cfm?catid=8&threadid=8135
Glyndwr
travis,
I have done a simple mod to the example in BOL (type text and image function into index tetxbox to find]
this shows how to replace a textstrig with another string (oldserver to newserver) it only finds the first occurrence so will need to execute as many times as occurrences
use...
Tokhra,
there is a freely available function called fn_split, I can't remember where i got it from - either Andrew Novick's site, sqlteam or microsoft.(shame on me)
which really makes this stuff easy ( create function included
drop table #t
go
create table #t(val1 int, val2 varchar(40))...
rzirpol.
I have obviously misunderstood your question,
do you want the sequence number to be kept between connections?
if so create a table with the batchno in and read this everytime you need to use it and increment when required.
Glyndwr
rzirpolo,
try something like this
exec sp_main 5,10
where:
create proc sp_main @start int, @end int
as
begin
declare @cnt int
while @start <= @end
begin
exec sp_doBatch (@start)
set @start = @start +1
end
end
create proc sp_doBatch @id in
as
begin
-- your batch ops
insert...
Tessai2003 ,
you can, if you wish query the db using vbscipt, following example will show you , providing you have sufficient db privelegs, you can easily modify this to update values also
Set cn = CreateObject ("adodb.connection")
Set rs = CreateObject...
Waynest,
there aren't arrays as such but there are workarounds
declare @myArray table (id int , myValue char(10))
declare @cnt int
set @cnt = 0
while @cnt < 10
begin
set @cnt = @cnt + 1
insert into @myArray
values(@cnt, cast(@cnt as char(10)))
end
select * from @myArray
Glyndwr
surfah,
a bit kak handed but works
drop table #tmpvndlst
drop table #withList
go
declare @list varchar(8000)
create table #tmpvndlst(
vendid int identity(1,1),
opseq char(10),
vendor varchar(4))
create table #withlist(opseq char(10) , vendorList varchar(1000))
INSERT INTO #tmpvndlst...
Chikey,
your sql statement including the union must be a single string
declare @sql varchar(8000)
set @sql = 'select a from tab1 UNION ALL select a from tabb'
Glyndwr
ibethea
try this
declare @item int
declare @text varchar(8000)
declare @tab table (num int)
set @text = '12, 23, 18, 34, 65, 70'
set @item = 1
while @item <>0
begin
set @item = charindex(',',@text)
if @item <> 0
begin
insert into @tab...
andycape
try a group by clause
create table #fruit ( fruit varchar(40), cost money ,tax money)
go
insert into #fruit values ('potatoes', 100,17.5)
insert into #fruit values ('potatoes', 200,35)
insert into #fruit values ('potatoes', 300,52.5)
go
select fruit, sum(cost + tax) 'Total Amount'...
godzuki
are you saying that you have applied sp3 to SQL and the problems have started, or that sql has been running ok with sp3?
if the former you may want to check out the cross database chaining issues with sp3 , otherwise I'm not sure
Robbomobb
I think this does what you want
create table #dbRecoveryModel (dbname sysname , recoverymodel sql_variant)
insert into #dbRecoveryModel exec sp_msforeachdb 'SELECT ''?'' , databasepropertyex(''?'', ''recovery'')'
select * from #dbRecoveryModel
Sivakumar
is this more what you're looking for ?
drop table #FileExistList
drop table #tab_files
go
create table #tab_files (tabFile varchar(30))
insert into #tab_files(tabFile) values ('c:\autoexec.bat')
insert into #tab_files(tabFile) values ('c:\config.sys')
insert into...
Sivakumar
is this more what you're looking for ?
it is a little more involved but gives you extra information.
drop table #FileExistList
drop table #tab_files
go
create table #tab_files (tabFile varchar(30))
insert into #tab_files(tabFile) values ('c:\autoexec.bat')
insert into...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.