all groups > sql server programming > april 2007 > threads for saturday april 28
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Cascade delete error
Posted by Flomo Togba Kwele at 4/28/2007 7:59:43 PM
I'm new at this and need some help. I tried to setup a situation where I delete
the children related to a parent when a parent is deleted. But I am getting an
error. I have changed the names of the columns and tables to make it easier.
Can anyone tell me what I have done wrong? Thanks, Flomo
... more >>
function and update statement
Posted by shank at 4/28/2007 3:34:38 PM
I have the below function...
CREATE FUNCTION ja.fctMI
(
@O VARCHAR(32)
)
RETURNS VARCHAR(8000)
AS
BEGIN
DECLARE @r VARCHAR(8000)
SELECT @r = ISNULL(@r+ Char(13) , '') + Instrument + ', '
FROM MI
WHERE OrderNo = @O
RETURN @r
END
- - - - - - - - - - - - ... more >>
sp calling another sp
Posted by ykffc at 4/28/2007 3:08:01 PM
When programming logics require "if then do something" and in the "do
something" there could be another if then.. and so on, making the codes very
difficult to read.
It is a general programming skill to combat this by having one main function
to call other subroutines. In traditional progam... more >>
Execute Procedure
Posted by shapper at 4/28/2007 2:34:23 PM
Hello,
I created an Update procedure.
>From within this procedure I need to execute the procedure named
syncronize which has Id and Text as inputs and Feedback as output:
...
@Id UNIQUEIDENTIFIER,
@Text NVARCHAR(MAX),
@Feedback INT OUTPUT
...
SELECT @Feedback = @@ERROR
..... more >>
3rd Highest salary <1176725901.118883.209090@l77g2000hsb.googlegroups.com>
Posted by Mahesh at 4/28/2007 11:46:23 AM
select distinct(sal) from emp a where 3 = (select count(distinct(sal)) from emp b where a.sal<= b.sal)
change 3 for nth highest.
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com... more >>
approaches for history of atomic changes
Posted by Frogger Green at 4/28/2007 10:44:46 AM
I'm working on a database that has a need to keep history of changes. If I
change an company's name, for example, I'd like to be able to know about
that change, as well as have awareness of the prior name so that I can go
back in time and run reports with the old name and/or new name. Therefor... more >>
scripting more than 1 table at a time in 2005?
Posted by Tim Zych at 4/28/2007 10:03:32 AM
Is there a way to script multiple tables in SQL 2005? In Sql 2000, I could
select 1 or more objects, tables, anything really and script (Create/Alter)
them out.
Sql 2005 is only letting me select 1 table at a time. How do I select >1 and
script them at the same time.
... more >>
IDENTITY_INSERT Increment Issue
Posted by apojani33 NO[at]SPAM yahoo.com at 4/28/2007 9:22:52 AM
I'm encountering an issue with an identity field enforcing its
increment value.
Example 1
DDL:
IF OBJECT_ID('TEST') IS NOT NULL
BEGIN DROP TABLE TEST END
CREATE TABLE TEST (
TESTID INT IDENTITY(5,10)
, OTHID INT NOT NULL)
SET IDENTITY_INSERT TEST ON
INSERT INTO ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Stored Procedure Performance Question
Posted by wsw at 4/28/2007 7:05:14 AM
Hello, I am fairly new to stored procedures and encountered a very
puzzling scenario that I would like to ask advice on (it even puzzled
a fellow coworker that is strong with stored procedures). Our
database had an existing stored procedure that I was assigned to re-
write. The original stored... more >>
|