Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone can help me??????? Giving

Status
Not open for further replies.

ii128

Programmer
May 18, 2001
129
US
Anyone can help me???????

Giving you the level_ID to get the Function_Desc.

The Function_Desc is from the tblDBFunctions. In the tblDBLevels, it has a field call Functions which combine the Function_ID's with "|"

SELECT Function_Desc
FROM tblDBFunctions
WHERE Function_ID = ANY
(SELECT Functions
FROM tblDBLevels
WHERE Level_ID = 1)

tblDBFunctions
Function_ID Function_Desc
1 aaaa
2 bbbb
3 vvvv

tblDBLevels
Level_ID Level_Name Functions
1 bbbb 1|2|3|


Any one can help me to get the Function_Desc????
 

The table design is poor. The functions should each be in a separate record. However, you can select the function using a string function LIKE .

SELECT [tblDBFunctions].[Function_Desc]
FROM tblDBFunctions, tblDBLevels
WHERE ((([tblDBLevels].[Functions]) Like "*" & [Function_ID] & "|" & "*") And (([tblDBLevels].[Level_ID])=1)); Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Any suggestion on the table destign??

 
tblDBLevels
Level_ID Level_Name Function_Id
1 bbbb 1
1 bbbb 2
1 bbbb 3
 
tlbroadbent,

Anymore Help???? I can't get the correct result Function_Desc.
 

1) I agreee with balves on the table redesign.
2) What result are you getting? I can't help if all you say is "I can't get the correct result." Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
I agreee with balves on the table redesign.
and I would sugest you to sort the data into a #temp table and then send it to the redesigned table.
Terry!
could you please add any help to the following:
thread183-161170 Why @@servername is null
Thanks!
AL Almeida
NT/DB Admin
"May all those that come behind us, find us faithfull"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top