Viewing 15 posts - 18,556 through 18,570 (of 18,923 total)
Hmm, besides making 2 separate sql statements and running both at the same time I don't think it's possible. You might maybe run a union on those both statement...
February 11, 2005 at 8:54 am
The UDF is more elegant, faster and has the added advantage of not building a global ##temp table which can cause big locking problems.
February 11, 2005 at 6:26 am
No you have to use the function. You have to declare a variable to ...
February 10, 2005 at 2:18 pm
CREATE FUNCTION dbo.fnGetChilds (@Parent_ID as varchar(10))
RETURNS varchar(4000)
AS
Declare @Items as varchar(4000)
set @Items = ''
Select @Items = @Items + CAST(Child_id as varchar(10)) + ', ' from dbo.tblChild where Parent_ID = @Parent_ID
SET @Items...
February 10, 2005 at 1:58 pm
You can use USER_NAME() and few other like this one (bol for details) to get the info about whose doing this stuff.
Also might I suggest you put your code in...
February 10, 2005 at 1:53 pm
You'll have to do some work because there's no premade report. But this can get you started :
Select * from INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
Select * from INFORMATION_SCHEMA.KEY_COLUMN_USAGE
Those views are all located...
February 10, 2005 at 9:50 am
I second AJ's opinion on this... You can't have integretity and don't have it at the same time. You could use AJ's idea or you could also create...
February 10, 2005 at 8:13 am
I've never actually done this but a view seems to be pretty easy to implement :
Select col1, col2, id from dbo.TableX where user_id =
dbo.FnTranslateUNameToUid(user_name())
where FnTranslateUNameToUid would simply translate...
February 10, 2005 at 7:46 am
CREATE TABLE [Payes] (
[PkPaye] [int] IDENTITY (1, 1) NOT NULL ,
[FkEmploye] [int] NOT NULL ,
...
CONSTRAINT [PK_Payes] PRIMARY KEY CLUSTERED
(
[PkPaye]
) ON [PRIMARY],
CONSTRAINT [FK_Payes_DatesDebutsSemaines] FOREIGN KEY
(
[FkSemaine]
) REFERENCES [DatesDebutsSemaines]...
February 10, 2005 at 6:59 am
Yup and it would be faster than my version since only 1 update is ran.
February 10, 2005 at 1:09 am
Exactly my point
... my solution doesn't have this limit.
February 9, 2005 at 1:45 pm
I've ran this on my test data and it returns incorrect results :
John Doe
JaneDoe
John
AFreakNameWithLotsOfNames
becomes
J A N E D O E
J O H N
A F R E A K N...
February 9, 2005 at 12:51 pm
I think I could provide better help if I could see the whole query and some sample data... I'm pretty sure that my solution is incomplete but it might get...
February 9, 2005 at 12:25 pm
This is not the prettiest code I've ever written but it works...
CREATE TABLE [Numbers] (
[PkNumber] [int] IDENTITY (1, 1) NOT NULL ,
CONSTRAINT [Pk_Number] PRIMARY KEY CLUSTERED
(
[PkNumber]
) ON...
February 9, 2005 at 11:55 am
Try this setup :
set statistics io on
--set statistics time on
go
--begin tran
EXEC dbo.MyProc
--rollback tran
set statistics io off
--set statistics time off
check out the message sections of QA to get that info...
February 9, 2005 at 11:27 am
Viewing 15 posts - 18,556 through 18,570 (of 18,923 total)