Viewing 15 posts - 961 through 975 (of 1,923 total)
Or this?
; WITH CTE AS
(
SELECT a.id,a.title,uao.userid ,
CountOfRows = COUNT(*) OVER(PARTITION BY uao.userid)
FROM user_artist_owned uao
INNER JOIN artists a
on...
February 15, 2011 at 6:41 pm
rohaandba (2/15/2011)
When I need to create a ‘View’ from the columns of different tables in a Database,
Is it necessary that the tables involving in that view should be related...
February 15, 2011 at 9:54 am
Why do u want to do that? a function can be executed for each row, so why not use that directly ? Actually, can u elaborate on what u are...
February 13, 2011 at 11:56 pm
Whooo.. i really don't understand the requirement.. if u would be precise in what u want, i think i can help you out..
Can u give us what ur original UPDATE...
February 12, 2011 at 9:36 am
How about this?
SET NOCOUNT ON
GO
DECLARE @RefNo VARCHAR(10)
SELECT @RefNo = 'GB_HQ1768'
;WITH CTE AS
(
SELECT RefNo,Version , ColName, Vals
...
February 10, 2011 at 12:28 pm
Or rather, this ?
WITH CTE_HIER AS
(
SELECT [Id],[Name] , [ParentId], CAST('' AS VARCHAR(50)) AS ParentName
FROM [ReportCodeDim]
WHERE [ParentId] IS NULL
UNION ALL
SELECT SRC.[Id],SRC.[Name] , SRC.[ParentId], REC.[Name] As ParentName
FROM [ReportCodeDim]...
February 10, 2011 at 1:36 am
Something like this?
WITH CTE_HIER AS
(
SELECT [Id],[Name] , [ParentId], CAST('' AS VARCHAR(50)) AS ParentName
FROM [ReportCodeDim]
WHERE [ParentId] IS NULL
UNION ALL
SELECT SRC.[Id],SRC.[Name] , SRC.[ParentId], REC.[Name] As ParentName
FROM [ReportCodeDim] SRC
JOIN...
February 10, 2011 at 1:19 am
barsuk (2/9/2011)
It is like apartment (Database) in the apartment building (Server).
Each Apartment Building (Server) has multiple apartments (Databases).
So in order to...
February 9, 2011 at 7:37 pm
Sharath, if u will have more than RefNo, just remove the WHERE clause in my query ; it will bring out the changed columns for all the RefNos..
February 9, 2011 at 7:35 am
GSquared (2/9/2011)
ColdCoffee (2/9/2011)
Gus, i think, you have missed adding Version column to your inner select.
The original request didn't include the version number in the results. I try to match...
February 9, 2011 at 7:30 am
Gus, i think, you have missed adding Version column to your inner select.
February 9, 2011 at 7:17 am
How about this?
SET NOCOUNT ON
DECLARE @RefNo VARCHAR(10)
SELECT @RefNo = 'GB_HQ1768'
;WITH CTE AS
(
SELECT RefNo , ColName, Vals
FROM
(
SELECT CAST(RefNo AS VARCHAR(200)) AS RefNo,
...
February 9, 2011 at 7:10 am
Will you be supplying only one reference number at a time ? and will there be only 2 rows per reference number?
February 9, 2011 at 6:34 am
Am totally confused on the requirement.. can you please elaborate on the requirement pls..
February 8, 2011 at 11:48 pm
Lynn Pettis (2/8/2011)
ColdCoffee (2/8/2011)
mtassin (2/8/2011)
Jeff Moden (2/7/2011)
Wolfmeister (2/7/2011)
That's pretty slick! Thanks guys.Just making sure... do you understand how ColdCoffee's method works?
Heck I didn't understand what he was doing with...
February 8, 2011 at 10:34 pm
Viewing 15 posts - 961 through 975 (of 1,923 total)