Forum Replies Created

Viewing 15 posts - 9,661 through 9,675 (of 13,461 total)

  • RE: Get email format

    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@ ...

  • RE: To get the System Login

    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

  • RE: Not able to connect SQL Server 2005 express editions by IP Address

    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...

  • RE: To get the System Login

    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...

  • RE: To get the System Login

    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...

  • RE: Database Simple Recovery Model issue

    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....

  • RE: Database Simple Recovery Model issue

    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...

  • RE: status = 1077936144 of database in sysdatabases

    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:...

  • RE: To get the System Login

    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...

  • RE: selecting column name dynamically

    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 ,...

  • RE: Primary Key Properties in Scripted Creation

    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)

  • RE: Primary Key Properties in Scripted Creation

    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...

  • RE: SQL Server ASP Session State Impact

    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...

  • RE: sql users

    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...

  • RE: query

    see if this helps you; it produces results like this, where NULLS mean the db was never backed up:

    Number of Days since last backup Backup type (D-database,L-log) backup_size...

Viewing 15 posts - 9,661 through 9,675 (of 13,461 total)