Viewing 15 posts - 256 through 270 (of 898 total)
subhajeetsur (5/22/2013)
u can use between while joining as said in above post but then it will not be optimized solution as ur query performance will hamper.
Do you have any other...
May 22, 2013 at 4:17 am
subhajeetsur (5/22/2013)
you can use row number with partitions to do the same
I think that is exactly what Lynn has suggested above.
May 22, 2013 at 4:13 am
This might help you
; WITH PRODUCT1 AS
(
SELECT*, DENSE_RANK() OVER( ORDER BY P.PARENT ) AS RN, 1 AS Lvl
FROMPRDST AS P
WHEREP.PARENT IN ( 1055874, 1055872 )
UNION ALL
SELECTPR.*, PR1.RN, PR1.Lvl + 1
FROMPRDST...
May 22, 2013 at 1:52 am
You will need a CTE to achieve the results
DECLARE@table TABLE
(
IdINT,
NameVARCHAR(10),
Value1INT,
value2INT,
PreviousRowId INT
)
INSERT@table
SELECT1, 'A', 10, 0, 0 UNION ALL
SELECT2, 'B', 0, 5, 1 UNION ALL
SELECT3, 'C', 0, 6, 2 UNION ALL
SELECT4, 'D',...
May 22, 2013 at 1:04 am
tknecht 32495 (5/21/2013)
The searching I've done for doing what I need suggests using an update statement to add information...
May 21, 2013 at 9:05 am
The result you want is exactly the same as what you have.
Why are trying to update it or am i missing something?
May 21, 2013 at 8:47 am
vishnurajeshsat (5/21/2013)
Thank you kingston it works but if i want to get more than 1 product details (i.e. 1055874 , 1055872 , etc. ) then how to change the query.
Something...
May 21, 2013 at 8:40 am
shohelr2003 (5/21/2013)
Kingston Dhasian (5/21/2013)
Do you have scheduled log backups or do you monitor and take the log backups manually?I have not scheduled it but I do it manually.
It would be...
May 21, 2013 at 6:26 am
shohelr2003 (5/21/2013)
May 21, 2013 at 4:23 am
You can use a CTE to do this
; WITH PRODUCT1 AS
(
SELECT*
FROMPRDST AS P
WHEREP.PARENT = 1055874
UNION ALL
SELECTPR.*
FROMPRDST AS PR
INNER JOIN PRODUCT1 AS PR1 ON PR.PARENT = PR1.CHILD
)
SELECT*
FROMPRODUCT1
May 21, 2013 at 2:48 am
philip.davy (5/21/2013)
HiI've worked out the problem.
from members_.memberID_ with (nolock)
shouldn't have memberID_ in the SQL
Thanks
Great you could find it out 🙂
May 21, 2013 at 2:29 am
from members_.memberID_ with (nolock)
Do you have a table named memberId_ which belongs to the schema members_ ?
May 21, 2013 at 2:09 am
Viewing 15 posts - 256 through 270 (of 898 total)