custum tags

M

mekusharim.ltd

hi ,
i have 2 questions .

about custom tags .
i have a table that users are inserting custom tages ,
it looks like :

user_id type value
1 99 television
2 98 beach
3 99 coldplay

etc.
now i have to make a search which will show all the users
that typed the same value from the same type .
i dont want the query to be a textual query (slow ...)
what is the right way to do it ?

another question :
how can i make a query that JOINs to tables from 2 different databases
???

THANX ...
 
M

Matt

Not sure about your first question. Maybe a stored procedure will work for
you?

Here is an example of a query that joins two databases (Users and IAPSST).

Use this syntax <database name>.dbo.<table name>

Select A.FirstName, A.LastName, C.*, D.AccountAccessID as EXPR1

from Users.dbo.USER_INFO A Join IAPSST.dbo.IAP_V1 C

on A.UserID = C.userID Left outer join

Users.dbo.ROLES D on

C.userID = D.UserID
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top