Viewing 15 posts - 46 through 60 (of 119 total)
Hi gail
that seems to have done it
9secs!
Can you give me an explanation of the code?
Thanks
Johann
May 20, 2008 at 6:02 am
Hi gail
that worked!
I am getting the correct order in the select
May 20, 2008 at 5:54 am
table def
create table #temp
(
[Id]int IDENTITY (1, 1) NOT NULL ,
[langCode] char(6),
[projectid] int,
[status] int,
[Order] int
)
As for sample data, its the one I posted before.
Is this enough or shall i give you...
May 20, 2008 at 5:44 am
Hi Sandy
Yeah but I need to compare the row from the select to the current row
If I do a select before the While, how can i get row by row...
May 20, 2008 at 5:40 am
I agree that I have to move away from the cursor, since its too much processing time!
However I cannot see how I can do your example with my procedure Sandy.
I...
May 20, 2008 at 5:38 am
hi Sandy
But I want to check on criteria, if projectid or langcode changes
May 20, 2008 at 5:30 am
Hi Gail
so here is an example
input:-
ID langCode ...
May 20, 2008 at 5:25 am
Hi Sandy
Can you show me how to do that?
Thanks
May 20, 2008 at 5:16 am
got it!
update #tempTable
SET fk_langid =
(
--SELECT lid,
CASE
WHEN lid like '%sr%' THEN '1234'
END
--FROM #tempTable
)
Thanks
May 12, 2008 at 8:00 am
Seems like the important thing is that the PageID > 0, that is why I am ordering in
ORDER BY PageID DESC, Status ASC
April 29, 2008 at 4:18 am
I clarified with my project leader
this is enough
ORDER BY PageID DESC, Status ASC
April 29, 2008 at 3:58 am
The rows that are not ordered, will be listed after the ordered rows
So the resultset should look something like this:-
ID ...
April 29, 2008 at 3:51 am
Hi I solved this
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[sp_getpageidsforedb]
@projectid int
AS
SELECTROW_NUMBER() OVER (ORDER BY e.StringID) AS IndexID,
e.StringID,
e.Trans,
e.Status,
COALESCE(s.PageID, 0) AS PageID
FROMeDBs AS e
LEFT JOIN(
SELECTStringID,
MAX(PageID) AS PageID
FROMStringIDsInPages
GROUP BYStringID
)...
April 15, 2008 at 7:09 am
Viewing 15 posts - 46 through 60 (of 119 total)