i dunno i thought sql had a problem with accepting null for datetimeLooking at those links it looks like some .NET bug, there is no problem setting datetime to null in T-SQL that I've ever come across.
― someone who is ranked fairly highly in an army of poo (Colonel Poo), Monday, 31 August 2009 15:46 (fourteen years ago) link
lol @ new board description. was it that dumb of a question
haha no i just liked the way it sounded
― mince lice (electricsound), Tuesday, 1 September 2009 06:07 (fourteen years ago) link
While we're at it, I have an SQL question, specifically SQL Server:
Is there any underneath-the-surface difference in what SQL Server actually does between the following 2 statements:
-- 1)
update pset x = d.xfrom p inner join d on p.id = d.id
-- 2)
update pset x = d.xfrom dwhere p.id = d.id
??
I reckon functionally it's the same thing, but we have a consultant who insists the 2nd form is more efficient, that SQL Server does something different behind the scenes. Trouble is our not-really-enforced SQL coding standard requires we always use the 1st example (and I think that's the ANSI way anyway).
Any expert users on ILX who can shed light on this?
― someone who is ranked fairly highly in an army of poo (Colonel Poo), Tuesday, 1 September 2009 14:20 (fourteen years ago) link
My understanding is that they generate the same query plan; however, I'm no SQL Server guru.
― a fact-checker with The New Yorker magazine (HI DERE), Tuesday, 1 September 2009 14:23 (fourteen years ago) link
That is my understanding also. This guy generally knows his stuff, but I think he's wrong on this one.
― someone who is ranked fairly highly in an army of poo (Colonel Poo), Tuesday, 1 September 2009 14:25 (fourteen years ago) link
http://lists.evolt.org/archive/Week-of-Mon-20050829/175368.html
At least in SQL 2000, they were supposed to resolve to the same query plan.
― a fact-checker with The New Yorker magazine (HI DERE), Tuesday, 1 September 2009 14:38 (fourteen years ago) link
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 offSet objShell = CreateObject("Wscript.Shell")Echo Please enter password and press returnSet /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))AsUpdate tblEmployeeset LoginDateTime = nullwhere @LoginPassword = LoginPasswordGO
― 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