Page 1 of 1 1
Topic Options
#110594 - 2003-12-18 09:10 PM Is this SELECT structure correct?
AlTaylor Offline
Fresh Scripter

Registered: 2003-12-08
Posts: 11
Assuming all other factors are correct (i.e. the share, privlages, ect.), does this SELECT look correct:

SELECT
CASE STUDENT1 (@userid = "STUDENT1")
USE H: /delete /persistent
USE H: "\\dellserver\students\"+@userid
ENDSELECT

Al Taylor

Top
#110595 - 2003-12-18 09:18 PM Re: Is this SELECT structure correct?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
no - looks a little off:

Code:

SELECT
CASE @userid = "STUDENT1"
USE H: /delete /persistent
USE H: "\\dellserver\students\"+@userid
CASE 1
ENDSELECT




Top
#110596 - 2003-12-18 09:20 PM Re: Is this SELECT structure correct?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
First off, Select statements should have a default Case as well. I wonder though, why you even need a Selct Case construct to map home drives if you use @UserID in the Use command.

Also, the brackets are not needed (@userid = "STUDENT1") to force precedence.

{edit: Beat out by the master}


Edited by Les (2003-12-18 09:23 PM)
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.051 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org