SELECT VirtualNicks.Nick,(SELECT TOP (1) VirtualMessages
FROM VirtualMessages ORDER BY NEWID()) AS ENick
FROM VirtualNicks
INNER JOIN OnlineOfflineUsers ON VirtualNicks.Nick = OnlineOfflineUsers.Nick
WHERE (OnlineOfflineUsers.OnlineUser = '1')
help me
mate u mna pifko...
VirtualNicks.Nick
VN1
VN2
VN3
VN4
VN5
VirtualMessages.VirtualMessages
VM1
VM2
VM3
VM4
VM5
OnlineOfflineUsers.OnlineUser
1
1
1
1
1
result ..... not working as i want(ORDER BY NEWID())
VN1 VM1
VN2 VM1
VN3 VM1
VN4 VM1
VN5 VM1
I need to get rand rows on right column
VN1 VM3
VN2 VM1
VN3 VM2
VN4 VM2
VN5 VM5
FROM VirtualMessages ORDER BY NEWID()) AS ENick
FROM VirtualNicks
INNER JOIN OnlineOfflineUsers ON VirtualNicks.Nick = OnlineOfflineUsers.Nick
WHERE (OnlineOfflineUsers.OnlineUser = '1')
help me
mate u mna pifko...
VirtualNicks.Nick
VN1
VN2
VN3
VN4
VN5
VirtualMessages.VirtualMessages
VM1
VM2
VM3
VM4
VM5
OnlineOfflineUsers.OnlineUser
1
1
1
1
1
result ..... not working as i want(ORDER BY NEWID())
VN1 VM1
VN2 VM1
VN3 VM1
VN4 VM1
VN5 VM1
I need to get rand rows on right column
VN1 VM3
VN2 VM1
VN3 VM2
VN4 VM2
VN5 VM5