Viewing 15 posts - 31 through 45 (of 397 total)
Modified on top of your post. The cursor is not the problem.
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_MySpaceUsed]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[usp_MySpaceUsed]
GO
create proc usp_MySpaceUsed
as
set...
April 14, 2005 at 7:14 pm
Just a thought.
Does Sybase have convert function?
April 14, 2005 at 1:03 am
use four part name like server.db.owner.object
open c2
fetch c2 into @DbNm
while @@fetch_status=0
begin
insert #Files exec (
'select F.[name],F.,F.[filename],G.groupname
from ' + @SrvNm + '.' + @DbNm + '.dbo.sysfiles F left join...
April 14, 2005 at 12:51 am
One option.
A Computed column on the table, use case statement to cumpute the value.
Modify dimension, add extra level to the hierarchy.
April 13, 2005 at 8:30 pm
Try something like
CREATE PROCEDURE MySQLSP
@P1 nvarchar(2)=Null,
@P2 nvarchar(2)=Null
AS
Select * From MySQLTable
Where Field1Value = isnull(@P1, Field1Value)
and And Field2 = isnull(@P2, Field2)
Order By MyIndexedField
April 13, 2005 at 12:04 am
The triggers and indexes are pre-defined. Use drop/create method. Indexes creation could take time, it worths the waiting to reflect the new reality.
April 12, 2005 at 6:46 pm
One option:
Map a driver with right credential so you can read from the file.
Then bcp.
April 12, 2005 at 12:47 am
Try something like following, you can put them in proc as well.
use database2
go
exec database1.dbo.proc1
April 12, 2005 at 12:42 am
select TableName = o.name, ColumnName = c.name, c.ColID,
t.name + '(' + rtrim(cast(c.Length as char(3))) +
case when c.xscale > 0 then
-- '[' + rtrim(cast(c.xprec as char(2))) + --xprec =...
April 10, 2005 at 11:46 pm
convert(varchar(5), birthdate, 101) between '03/19' and '04/27'
April 6, 2005 at 7:43 pm
=Iif(RowNumber(Nothing) Mod 2, "Gray", "White")
April 6, 2005 at 6:01 pm
I mean isqlw.
Try this.
save following sql to file (test.sql)
select * from pubs.dbo.authors
Change default session setting
open sql query analyzer, Tools/Options,
In Results tag,
tick Print column headers(*) check box.
select...
April 6, 2005 at 5:19 am
Viewing 15 posts - 31 through 45 (of 397 total)