Showing posts with label froma. Show all posts
Showing posts with label froma. Show all posts

Monday, March 12, 2012

newbie lookup table

How would I run a query, on the server side, on a table that would pull from
a second table (like a lookup table) and write the result to each row in a
record set of the first table?
ThanksHi,
UPDATE TableOne T1
SET T1.ColumnToUpdate = T2.ColumnToRetrieveValueFrom
FROM Table1 as T1
INNER JOIN Table2 as T2
ON (T1.RelatedKey = T2.RelatedKey)
Allright ?
HTH, Jens Smeyer.
http://www.sqlserver2005.de
--
"HollyylloH" <HollyylloH@.discussions.microsoft.com> schrieb im Newsbeitrag
news:64F2B05C-A982-4709-9DB2-2F5B9431EF88@.microsoft.com...
> How would I run a query, on the server side, on a table that would pull
> from
> a second table (like a lookup table) and write the result to each row in a
> record set of the first table?
> Thanks|||UPDATE TableOne
SET T1.ColumnToUpdate
= (SELECT T2.ColumnToRetrieveValueFrom
FROM Table2 AS T2
WHERE TableOne.RelatedKey = T2.RelatedKey) ;

Monday, February 20, 2012

Newbee password question

Is there a way to retreive passords for SQL Server authenticated users from
a system table? I'd like to retreive the passwords for a handfull of SQL
Server users and place them in a database table (for application purposes).
I've looked for functions and stored procedures in the Books On Line, but
came up empty.
Thanks,
JoeSQL Server stores passwords using a one-way hash. Although you could
retrieve the hashed data from sysligns, the value is meaningless to your
application.
Hope this helps.
Dan Guzman
SQL Server MVP
"JRE" <nomail@.all> wrote in message
news:%232kk9yiLEHA.268@.TK2MSFTNGP10.phx.gbl...
> Is there a way to retreive passords for SQL Server authenticated users
from
> a system table? I'd like to retreive the passwords for a handfull of SQL
> Server users and place them in a database table (for application
purposes).
> I've looked for functions and stored procedures in the Books On Line, but
> came up empty.
> Thanks,
> Joe
>|||Thanks Dan,
I saw several articles describing adding or changing passwords...but not
fetching them. Oh well...I guess I'll have to think of an alternative
solution to what Im trying to do
Regards,
Joe
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:ePv63IlLEHA.1032@.tk2msftngp13.phx.gbl...
> SQL Server stores passwords using a one-way hash. Although you could
> retrieve the hashed data from sysligns, the value is meaningless to your
> application.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "JRE" <nomail@.all> wrote in message
> news:%232kk9yiLEHA.268@.TK2MSFTNGP10.phx.gbl...
> from
> purposes).
but[vbcol=seagreen]
>