Click here to Skip to main content
15,886,873 members
Home / Discussions / Database
   

Database

 
GeneralRe: Whats wrong with SQL statement? Pin
gengel2-Mar-10 22:46
gengel2-Mar-10 22:46 
GeneralRe: Whats wrong with SQL statement? [modified] Pin
i.j.russell2-Mar-10 23:35
i.j.russell2-Mar-10 23:35 
GeneralRe: Whats wrong with SQL statement? Pin
gengel3-Mar-10 1:14
gengel3-Mar-10 1:14 
GeneralRe: Whats wrong with SQL statement? Pin
gengel3-Mar-10 1:17
gengel3-Mar-10 1:17 
GeneralRe: Whats wrong with SQL statement? Pin
i.j.russell3-Mar-10 2:00
i.j.russell3-Mar-10 2:00 
QuestionPermission sp_rename Pin
Clas Andersson2-Mar-10 7:23
Clas Andersson2-Mar-10 7:23 
AnswerRe: Permission sp_rename Pin
Mycroft Holmes2-Mar-10 10:52
professionalMycroft Holmes2-Mar-10 10:52 
QuestionSql issue.. Pin
<<Tash18>>1-Mar-10 21:05
<<Tash18>>1-Mar-10 21:05 
I have 2 tables in my data base..
1. User_Group table
2. Function_Group table
Example:
Function_Group table :
Groupid      Applicationid    Functionid

LCUser1	 LCDocMgmt	  LC01
LCUser2	 LCDocMgmt	  LC02
LCUser1	 LCDocMgmt	  LC03
LCUser3	 LCDocMgmt	  LC04
LCUser3	 LCDocMgmt	  LC05
LCUser2	 LCDocMgmt	  LC06
LCUser2	 LCDocMgmt	  LC08
LCUser1	 LCDocMgmt	  LC09

User_Group table:
Userid  Groupid

900410	 LCUser1
900846	 LCUser1
900411	 LCUser3

Now i use the following query to retrieve the Groupid for a particular Userid :

Select ug.groupid from User_Group ug, Function_Group fg where fg.ApplicationID='LCDocMgmt' and fg.GroupID = ug.GroupID and ug.UserID='900846'

The result that i get on executing the above query is:
groupid

LCUser1
LCUser1
LCUser1

Actually i Dont require repetition of records. If there is 2 distinct records i just want the 2 distinct records without repetition.. can any one plz help me..

Thanx in advance....
Regards,
Tash
AnswerRe: Sql issue.. Pin
J4amieC1-Mar-10 21:15
J4amieC1-Mar-10 21:15 
GeneralRe: Sql issue.. Pin
<<Tash18>>1-Mar-10 22:44
<<Tash18>>1-Mar-10 22:44 
GeneralRe: Sql issue.. Pin
J4amieC1-Mar-10 23:05
J4amieC1-Mar-10 23:05 
QuestionShould I index this? Pin
Mike6543211-Mar-10 9:22
Mike6543211-Mar-10 9:22 
AnswerRe: Should I index this? Pin
Luc Pattyn1-Mar-10 9:34
sitebuilderLuc Pattyn1-Mar-10 9:34 
GeneralRe: Should I index this? Pin
Mike6543211-Mar-10 9:42
Mike6543211-Mar-10 9:42 
GeneralRe: Should I index this? Pin
David Mujica1-Mar-10 10:20
David Mujica1-Mar-10 10:20 
GeneralRe: Should I index this? Pin
Mike6543211-Mar-10 20:30
Mike6543211-Mar-10 20:30 
QuestionLooking for a book on SSIS Pin
Corporal Agarn1-Mar-10 6:30
professionalCorporal Agarn1-Mar-10 6:30 
QuestionConcatenating strings in MS SQL Pin
#Jet1-Mar-10 1:05
#Jet1-Mar-10 1:05 
AnswerRe: Concatenating strings in MS SQL Pin
Corporal Agarn1-Mar-10 6:42
professionalCorporal Agarn1-Mar-10 6:42 
GeneralRe: Concatenating strings in MS SQL Pin
#Jet2-Mar-10 6:22
#Jet2-Mar-10 6:22 
GeneralRe: Concatenating strings in MS SQL Pin
Corporal Agarn3-Mar-10 0:54
professionalCorporal Agarn3-Mar-10 0:54 
QuestionORM with streaming Pin
pebrian2728-Feb-10 23:01
pebrian2728-Feb-10 23:01 
AnswerRe: ORM with streaming Pin
Mycroft Holmes28-Feb-10 23:55
professionalMycroft Holmes28-Feb-10 23:55 
GeneralRe: ORM with streaming Pin
pebrian271-Mar-10 0:26
pebrian271-Mar-10 0:26 
GeneralRe: ORM with streaming Pin
pebrian271-Mar-10 0:45
pebrian271-Mar-10 0:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.