Viewing 15 posts - 226 through 240 (of 414 total)
Meaning... (for a non-native English speaker ) ???
September 22, 2005 at 7:40 am
Yes, it would be easier if date and time were in the same column
I guess your query will fail if the combination of...
September 22, 2005 at 7:33 am
If you have the points in a table you could try this:
CREATE TABLE Routing
(
RoutingString nvarchar(2000)
)
CREATE TABLE PointsChosen
(
Point nvarchar(10)
)
INSERT INTO Routing(RoutingString) VALUES ('A->C->F')
INSERT INTO Routing(RoutingString) VALUES ('B->G->D')
INSERT INTO Routing(RoutingString) VALUES ('A->D->K')
INSERT...
September 22, 2005 at 4:26 am
Does this work? I would imagine you would get an error when you run this proc, because the variables are not known in the dynamically executed part. On the other...
September 22, 2005 at 3:30 am
I suppose it can be done without a temp table, but that's going to be hard... Instead, try this:
create table #temp
(
[Id] int identity(1,1),
[OrderID] int null,
[Customer] varchar(100) null,
[Order Date] datetime null,
[Update...
September 22, 2005 at 2:25 am
Try this - the varchar(20) in the function can easily be changed to something else, e.g varchar(8000).
create table T1(Ln_no int, b_flag char(1), Pkt_type int, pkt_id int)
go
insert T1 select 1, 'A', ...
September 22, 2005 at 2:06 am
I'm from Denmark.
Post your question in another thread, then someone else will answer (I'm about to leave for now).
September 21, 2005 at 8:15 am
I didn't expect it to be that fast....
Send half of your thanks to Remi, I have stolen the idea of using the Numbers...
September 21, 2005 at 7:40 am
You are welcome - please post the result of your test...
Also note that if your numbers always have the same length - 36...
September 21, 2005 at 7:01 am
I think I have a faster (set-based) solution (the creation of the Numbers table is stolen from one of Remi's posts):
IF Object_id('Numbers') > 0
DROP TABLE dbo.Numbers
GO
CREATE TABLE dbo.Numbers (PkNumber int identity(1,1), dude...
September 21, 2005 at 5:36 am
I have posted a different solution below, which creates and uses a second table named testtable2. Please let me know if this performs better.
create table testtable(#Tr int, Name varchar(100), Perc...
September 18, 2005 at 2:00 pm
This perhaps (and I forgot "desc" in my first query):
select top_state, stu_name from tresult t
where stu_name in (select top 2 stu_name from tresult where top_state = t.top_state order by tot_marks...
September 16, 2005 at 6:09 am
I this what you are looking for (in the top 5 case):
select top_state
from
(
select top 5 top_state, sum(tot_marks) as tot, max(tot_marks) as m from tresult
group by top_state
order by tot, m
)
dt
September 16, 2005 at 5:19 am
This suggestion requires that the rows of your table are unique:
create table testtable(#Tr int, Name varchar(100), Perc int)
go
insert into testtable select 100, 'John', 25
insert into testtable select 100, 'Harry',...
September 16, 2005 at 2:51 am
Viewing 15 posts - 226 through 240 (of 414 total)