Viewing 15 posts - 9,661 through 9,675 (of 13,461 total)
well, you could infer it is fname.lname by counting the number of periods left of the @ symbol:
declare @email varchar(1000)
set @email = 'firstname.lastname@freehills.com'
select SUBSTRING(@email,1,CHARINDEX('@',@email)),
REPLACE(SUBSTRING(@email,1,CHARINDEX('@',@email)),'.',''),
LEN(SUBSTRING(@email,1,CHARINDEX('@',@email))) - len(REPLACE(SUBSTRING(@email,1,CHARINDEX('@',@email)),'.',''))
firstname.lastname@ ...
April 19, 2010 at 10:55 pm
also another thread looking for the same issue, and everyone agreeing it's not possible withought jumping to poweshell or wmi, but with a better explanation than mine:
http://www.sqlservercentral.com/Forums/Topic905937-146-2.aspx
April 19, 2010 at 10:42 pm
you need to do IP\Instance, or IP,port for the servername: you need to know which port the express is using;
192.168.1.100\SQLEXPRESS
192.168.1.150,1744
i think this script will help find the listening port:
CREATE TABLE...
April 19, 2010 at 10:38 pm
no way to get the logged in user than i can think of so far;
xp_cmdshell gave me this as a result of whoami:
create table #Results (
LinesFromCmd varchar(1000))
insert into #Results (LinesFromCmd)
exec...
April 19, 2010 at 10:27 pm
ahh i see what you are after;
if you login to SQL with SQL authentication, your windows login information is not used, and would not be available i think;
if you login...
April 19, 2010 at 10:00 pm
changing the model won't make any difference in the growth, i think; millions of rows of logging to undo the operation just in case it fails will occur regardless....
April 19, 2010 at 12:04 pm
do your updates in batches; after each batch, the simple recovery model will checkpoint, and will prevent the log from growing out of control;
the key piece is you need a...
April 19, 2010 at 11:56 am
see this thread:
http://www.sqlservercentral.com/Forums/Topic326235-5-1.aspx it's got a complete explanation on the flags., as well as a code snippet to plug in your status and get the results on page two:...
April 19, 2010 at 11:41 am
to add to what Henrico gave you, here's a collection of some of the available functions for that kind of information:
i logged in as sa, then my windows domain, and...
April 19, 2010 at 9:44 am
basically my recommendation mirrors vaibhav's below; four parameters, two for column names and two for values;
if you are going to do that, however, why not just build the whole ,...
April 17, 2010 at 4:42 am
it's just syntax.
After the datatype, you say constraint/nameOfConstraint/Type of constraint if you are doing it inline:
CREATE TABLE OWNERS2 (OwnerID INT CONSTRAINT [PK__OWNERS__TWO] PRIMARY KEY IDENTITY)
April 17, 2010 at 4:19 am
defining a constraint name is optional...primary key, foreign key, defaults, check constraints...all of them will be auto named unless you explicitly define it:
here's your table with the named constraint instead:
CREATE...
April 16, 2010 at 8:06 pm
here's a link to an ms article that goes over ASP vs ASP.NET session state;
http://msdn.microsoft.com/en-us/library/ms972429.aspx
usually the session is heald in memory, so it's a little slower with the roundtrip to...
April 16, 2010 at 11:39 am
a new database is really a copy of the model database.
if you add user,sroles, functions,tables,procs or anything else to the model database, all new databases inherit them when they get...
April 16, 2010 at 11:21 am
Viewing 15 posts - 9,661 through 9,675 (of 13,461 total)