Viewing 15 posts - 3,001 through 3,015 (of 6,036 total)
Peso (6/11/2008)
I believe you are wrong Sergiy, again.
Happy to brighten you day!
What else could bring some joy into your life?
😀
Yes, aggregation does "SET" in your query and I missed it....
June 11, 2008 at 5:14 pm
Peso (6/11/2008)
DECLARE @PNo NUMERIC(10,0)
SELECT@PNo = MIN(PNo)
FROMPT
WHEREPDone = 0
WHILE @PNo IS NOT NULL
BEGIN
...
UPDATEPT
SETPDone = 1
WHEREPNo = @PNo
SELECT@PNo = MIN(PT)
FROMPT
WHEREPDone = 0
END
You forgot
SET @PNo = NULL
before assigning new MIN(PT) inside of...
June 11, 2008 at 8:25 am
Once again, last version of the script you posted works fine without errors.
This is my test script:
CREATE TABLE LOG_TABLE
(
START_TIME datetime,
END_TIME varchar(100),
ERROR_MSG text
)
GO
create procedure Message_Insert
(
@START_TIME datetime,
@END_TIME varchar(100),
@ERROR_MSG text
)
as
Begin
Insert into LOG_TABLE (START_TIME,END_TIME,ERROR_MSG)
Values(@START_TIME,@END_TIME,@ERROR_MSG)
End
GO
EXEC...
June 11, 2008 at 7:04 am
Ahmad Osama (6/11/2008)
may i have the reason......bcoz i wud hv to us a cursor...if i do it at sql
Why would you need a cursor?
June 11, 2008 at 12:12 am
I believe the biggest problem here is the wrong logic.
As per the requirement, "avg number of the top 3 most recent months of avg slow fast days" for the customer...
June 10, 2008 at 11:59 pm
karthikeyan (6/10/2008)
Ok.Can you tell me what could be the reason for the error message ?
Which error message?
I don't get any one.
June 10, 2008 at 6:22 am
rclgoriparthi (6/10/2008)
it gives out put like this :- 27 Apr 08
but i want out format like this 27-Apr - 2008
Use function REPLACE on the result you've got.
June 10, 2008 at 5:48 am
I hope your SQL Server can now understand your code as well.
At least mine can.
June 10, 2008 at 5:45 am
Are you sure it's T-SQL script?
You need to learn the syntax of CREATE PROCEDURE and INSERT INTO statements.
I would suggest using BOL or any other book about essential T-SQL.
June 10, 2008 at 5:00 am
What's wrong with Profiler?
June 9, 2008 at 2:42 pm
And another question:
where ID2 5 and 6 come from?
June 7, 2008 at 2:27 pm
Read topic "Cross-Tab Reports" in Books Online.
Tell us if it helped.
June 6, 2008 at 12:31 am
WHERE
FirstPartOfKey = ISNULL(@PartialKey,FirstPartOfKey)
From my experience this approach could cause performance disaster.
In most cases this one is more effective:
...
June 3, 2008 at 1:56 pm
You may define constraints without naming it.
Create Table #t1 (
id int NOT NULL ,
column1 char(10) NULL,
UNIQUE clustered (column1)
)
May 30, 2008 at 4:20 pm
So something to communicate to my devs would be that they should execute their inserts/updates/deletes by throwing a sql command execute type of adodc call instead of opening a recordset...
May 30, 2008 at 4:12 pm
Viewing 15 posts - 3,001 through 3,015 (of 6,036 total)