Please refer to the first post - for your reference here it is:
SELECT * FROM
(SELECT ROW_NUMBER() OVER (ORDER BY A.UserId)
AS rowNum, A.*, B.UserName FROM WiseTopic_Friend A
INNER JOIN WiseTopic_User B ON A.FriendId = B.UserId
WHERE a.userid=@UserId)
AS X...
Hi Rac2
Thanks for your reply. I agree - the way you described is how it theoritically SHOULD work. If you look at my query above, and imagine the varible @USERID is equal to 3, then you will see that its exactly the same as what you just wrote out.
WHERE a.friendid=@UserId
The problem is I...
I am trying to determine what "Friends" a "User" has, based on a lookup table that holds a friends/user relationship information. The table looks like this:
UserId | FriendId
-----------------
1 | 3
7 | 9
4 | 3
1 (Shawn) is friends with 3 (Ashlee), so therefore...
The number one reason why we're recording ip's is to stop people from hitting F5 numerous times in order to increase their rankings for various things like videos and blog posts. We're checking for duplicate IP views that are consequtive.
Thanks for your input. I feel better already!
Shawn...
Here is the page I'm workin' on:
http://wisetopic.com/profile/?UserId=1
Each user has a "Profile". Every time a request is made for that user's profile (or a user's image, a video, etc) I am recording that "View", or instance of http request, in a table that corresponds to the type of "View"...
I created two "user" tables, one called "USER" that just holds the user's data such as their username, email address, and password; and a second table called "USER_VIEWS" that only holds their views. The reason why I dont increment an int column in the original USER table is because we need to...
Hi Experts!
While creating a table in a production SQL 2005 database to hold the "views" of a user profiles, I realized that this table will very quickly grow to such a scale that worries me a bit. I don't have exp w/database of this volume. Can anyone who is more weathered in the database...
Just Curious - Why the need to assign an alias to the sub query if its never referenced. For example this works:
SELECT * FROM
(SELECT ROW_NUMBER() OVER (ORDER BY A.UserId) AS rowNum,
A.*, B.UserName
FROM WiseTopic_Friend A
INNER JOIN WiseTopic_User B
ON A.UserId = B.UserId) AS X...
Why does this query return an error saying:
"Invalid column name 'rowNum'."
SELECT
ROW_NUMBER() OVER (ORDER BY userid) as rowNum,
userid,
dateadded
FROM
Wisetopic_Friend
WHERE
rowNum > 3
Shawn Molloy
Seattle, WA
Do you mean I have to create variables to hold each select result then add it to a temp table? can you explain a littler further please?
Thanks for your help!
Shawn Molloy
Seattle, WA
A union on this code puts both of the values in two seperate rows in one single column with no name.
I'd like the data to be in a table like this:
MessageCount | CommentCount
----------------------------
0 | 7
Unless I'm using the union statement...
how do i combine these select statements into one table?
select count(*) from wt_message MessageCount where recipient=1
select count(*) from wtcomment commentCount where userid=1
Thanks,
Shawn Molloy
Seattle, WA
Yeah great catch! Stupid mistake on my part....
Another reason why it wasn't working (and I was getting no error) was because, for some weird reason the calling function wasn't being recoginzed if typed like this:
<div onclick='album_go('4');'>
but when I changed it to the double quotes it...
How do I stop from adding this item while examing each item in a repeater control through the RepeaterItemEventHandler event handler?
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
// skip if the album is empty...
Per the subject, this doesn't work in an iframe.
function album_go(albId)
{
alert('Won't see this...');
location.href = 'tray_photos.aspx?albumId='+albId;
}
Shawn Molloy
Seattle, WA
So if a page has a URL of
http://mySite.com/thePage.aspx?id=4
and inside "thePage.aspx" there is an iframe with a url of http://mySite.com/theIframe.aspx how can theIframe.aspx see the "id" querystring parameter?
-- shawn
Shawn Molloy
Seattle, WA
Can you access the Powershell from the .NET framework? Is there some constants you have access to in C# to more easily perform this operation?
Shawn Molloy
Seattle, WA
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.