Viewing 15 posts - 106 through 120 (of 134 total)
Tables ( not the # or ## tables ) created in tempdb will exists till next restart of the server, as tempdb is rebuild from scratch at each start of...
March 31, 2004 at 2:38 am
You could store the login/password (encrypted) in a table and let the procedure fetch this from that table. You could also store this in the registry and read it from...
March 31, 2004 at 2:03 am
Do you have a list of tags ?
March 31, 2004 at 1:52 am
You can not use the temp table after the EXEC. This is because EXEC is run in a new "connection". You could try to create a 'global temporary...
March 29, 2004 at 11:50 pm
DATALENGTH returns the number of bytes, and not the number of characters ( this is not the same ) But Len returns...
March 26, 2004 at 9:24 am
I saw the script "Function To Retrieve Last Index ". I do not understand why it is so complicated. THis script does the same :
create function dbo.LastIndexOf
(
@strValue varchar(4000),
@strChar varchar(50)
)
returns...
March 26, 2004 at 2:40 am
select CName,CADD,CScore
from CustomerDetails
where CName in ( Select CName From CustomerDetails group by CName having count(*) = 1)
March 26, 2004 at 2:02 am
Me to, I wrote my own log shipping routines , and have a stand by server that I can use. I do not understand...
March 25, 2004 at 5:52 am
The rsultset is not stored. If you want the result in a table, you should do like this :
create table #header
(
BackupName nvarchar(128), -- Backup set name.
BackupDescription nvarchar(255), --...
March 23, 2004 at 12:36 am
Little error in your trigger. Please try this :
Create trigger dbo.bkiTriggerTest_Instead
on dbo.bkiTriggerTest
INSTEAD OF INSERT
AS
set nocount on
insert into dbo.bkiTriggerTestDups (i2.pkid, i2.dval1, i2.dval2)
...
March 23, 2004 at 12:24 am
There's nothing wrong with it !
I do create a lot of sp_ procedures in the master database, but to distinguish MS sp_ procedures and mine, I use the prefix sp__...
March 21, 2004 at 3:24 pm
Do you need something like this :
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Sales_All_Children]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop proc [dbo].[Sales_All_Children]
GO
CREATE PROCEDURE [dbo].[Sales_All_Children]
(
@EntityID varchar(30),
@EntityTypeID int
) AS
begin
--Total sales...
March 19, 2004 at 12:28 am
To strip only the ending *, you could try this script :
create table tsttable ( tstcol varchar(20) )
go
insert tsttable values ('ABC**')
insert tsttable values ('ABC**D')
insert tsttable values...
March 18, 2004 at 1:18 am
You can do 10 fetches. But this will generate 10 result sets ... :
create procedure aa
@rowset integer
as
begin
SET NOCOUNT ON...
March 18, 2004 at 12:58 am
If the trigger runs for insert, the deleted table will be empty. You could do this like :
CREATE TRIGGER [sp_trrequest] ON [dbo].[TrRequest]
FOR INSERT, UPDATE
AS
BEGIN
DECLARE
March 18, 2004 at 12:29 am
Viewing 15 posts - 106 through 120 (of 134 total)