noob sql questions

Message Bookmarked
Bookmark Removed
Not all messages are displayed: show all messages (22 of them)

as an intermediate noob i would only use 1. the "more efficient" thing sounds bogus

am0n, Tuesday, 1 September 2009 14:42 (fourteen years ago) link

We're on SQL Server 2005 but I can't imagine it's any different there.

someone who is ranked fairly highly in an army of poo (Colonel Poo), Tuesday, 1 September 2009 14:44 (fourteen years ago) link

I got my thing to work ^________^

batch file

echo off
Set objShell = CreateObject("Wscript.Shell")
Echo Please enter password and press return
Set /p var1=
osql -d AFW3 -U sa -P password -S TESTSERVER -q "Exec EmployeePasswordLogout @LoginPassword=%var1%"

sql stored proc

CREATE PROC EmployeePasswordLogout (@LoginPassword varchar (10))
As
Update tblEmployee
set LoginDateTime = null
where @LoginPassword = LoginPassword
GO

bnw, Wednesday, 9 September 2009 16:18 (fourteen years ago) link

Dude seriously

Also what happens if 2 employees by coincidence have the same password?

Colonel Poo, Wednesday, 9 September 2009 20:27 (fourteen years ago) link

Being logged out while you are still using the database is only a problem if you were to try to enter it again which is pretty rare. But it probably isn't too hard to get username in there too.

bnw, Wednesday, 9 September 2009 21:10 (fourteen years ago) link


You must be logged in to post. Please either login here, or if you are not registered, you may register here.