Viewing 15 posts - 16 through 30 (of 49 total)
It's enough as follow,
set transaction isolation level repeatable read
begin tran
declare @tInfo table
(TID varchar(30), DDate datetime, RID varchar(30), Posi tinyint, BusN varchar(10),
TripN varchar(10), Stat varchar(1), Cflg varchar(1), Iflg varchar(1));
;WITH CTE...
June 15, 2010 at 8:01 pm
Based on your guidance, below is my latest statement,
declare @tInfo table
(TID varchar(30), DDate datetime, RID varchar(30), Posi tinyint, BusN varchar(10),
TripN varchar(10), Stat varchar(1), Cflg varchar(1), Iflg varchar(1));
;WITH CTE AS
(
select...
June 15, 2010 at 1:29 am
lmu92 (6/13/2010)
When thinking about it again:Why do you need to have separate tables per month?
Do you have to deal with such a large data volume? Did you consider horizontal partitioning?
Yes...
June 13, 2010 at 6:02 am
Hello Sir,
tq very much. your guidance is my inspiration
April 27, 2010 at 6:21 pm
Me run as follow,
--== FIRST LETS UPDATE THE DATA INTO THE SECOND TABLE
--== IF THE ROWS DOES EXIST
UPDATE T2
SET T2.Posi = T1.Posi
FROM
#tPosi T2
INNER JOIN
...
April 16, 2010 at 5:08 am
So far, me can insert into #tripH as follow,
CREATE TABLE #tripH
(idx smallint identity(1,1),timerHidx smallint, troutehidx smallint,
seq tinyint,dprtdte smalldatetime);
insert into #tripH
SELECT timerHidx ,troutehidx , seq ,dprtdte
FROM
(SELECT ROW_NUMBER() OVER (PARTITION BY ...
March 18, 2010 at 12:09 pm
Dear Sir,
After a week, your guidance solved my problem.
tq very much
March 12, 2010 at 7:29 pm
Sir, so far i've as follow,
declare @idx smallint
declare @data xml
set @data='<trips>
<trip>
<routeh>1</routeh>
<seq>1</seq>
<tripnme>trip1</tripnme>
<dprtweekday>1011101</dprtweekday>
<dprttimes>
<dprttime routed="6">9:00AM</dprttime>
<dprttime routed="7">2:30PM</dprttime>
</dprttimes>
</trip>
<trip>
<routeh>1</routeh>
<seq>2</seq>
<tripnme>trip2</tripnme>
<dprtweekday>1110001</dprtweekday>
<dprttimes>
<dprttime routed="6">11:00AM</dprttime>
<dprttime routed="7">4:30PM</dprttime>
</dprttimes>
</trip>
</trips>'
DECLARE @INSERTED_VALUES table
(idx int,
[troutehidx] [smallint] NOT NULL,
[seq] [tinyint] NOT NULL
)
insert into dbo.tRouteTimerHx...
March 11, 2010 at 5:48 pm
lmu92 (3/10/2010)
custom data type.
It won't add any value to your code or database structure. Instead it will
cause pain to maintain...
March 11, 2010 at 3:40 am
ok sir. will take not on that
March 7, 2010 at 8:28 am
lmu92 (3/7/2010)
What is the reason not to use a foreign key?Seems like the appropriate solution for the requirement.
Now, i'm drop tH and using foreign key as follow,
CREATE TABLE [dbo].[tH](
[idx] [smallint]...
March 7, 2010 at 3:03 am
Viewing 15 posts - 16 through 30 (of 49 total)