Viewing 15 posts - 9,406 through 9,420 (of 13,461 total)
you can create a job that starts when the sql agent starts; it's one of the options, after you create the job, to determine the schedule....there is a selection for...
May 20, 2010 at 7:28 pm
i think this is what you might be after:
--results:
TheDomainTheUser
TheDomainlowell
declare @MyDomainLogin varchar(30)
SET @MyDomainLogin='TheDomain\lowell'
--SET @MyDomainlogin = SUSER_NAME()
SELECT
--the -1 and +1 are to remov ethe char '\' itself fromt eh results
SUBSTRING(@MyDomainLogin,1, CHARINDEX('\',@MyDomainLogin)...
May 20, 2010 at 12:17 pm
great marty! glad it's working for you!
that FOR XML is great for concatenating, and the Tally Split is perfect for the opposite...getting a delimited list into rows.
Those two things...
May 20, 2010 at 11:43 am
multiply or add?
the DATEADD function can accept your start date and add x number of months to it to give you that future date, is that what you want?
select DATEADD(mm,14,'20090701...
May 20, 2010 at 11:25 am
--results
Acct TransDesc Date ...
May 20, 2010 at 11:21 am
no problem;the file name is being created with the UTC time (greenwich), so you must be in the US EST time zone to be -5 hours;
the times inside the backup...
May 20, 2010 at 10:50 am
i think you'll need a FOR XML to concat the colleges;
here's an example, i would have adapted it to your data if you included the CREATE TABLE and INSERT...
May 20, 2010 at 9:56 am
Donato this is how i usually update a table from multiple sources...note the commented SELECT statement so i can run the bottom portion to test before and after:
SET XACT_ABORT ON
BEGIN...
May 20, 2010 at 9:51 am
i have this in my snippets as teh way to run DBCC commands on linked servers:
SELECT * FROM OPENQUERY( [linked server],'SET FMTONLY OFF; EXEC (''USE DATABASE; DBCC showfilestats WITH NO_INFOMSGS...
May 20, 2010 at 9:22 am
i've seen this when the file you are processing comes from a unix type source...instead of slash-n for the row terminator, which looks for CHAR(13) + CHAR(10), try changing your...
May 20, 2010 at 9:19 am
linked servers are slow.
usually a SELECT from a linked server, if it is joining on a local table, will copy the ENTIRE table from the linked server into your local...
May 20, 2010 at 8:49 am
i most often add a persisted calculated field for indexing purposes.
I've used it to pull out a substring from a field which is often searched, as well as dates with...
May 20, 2010 at 8:23 am
some powerful thread pruning occurred;
i had posted the following and then reported them to the SSC gods:
i'm thinking that chinnu.saha and pinky.bd420 are bots that are just designed to...
May 19, 2010 at 1:17 pm
still not so bad, but the same solution: the end users will have to enter/select the prefix and suffix, which could even have defaults on them, that's all:
CREATE TABLE EXAMPLE(
id...
May 19, 2010 at 1:09 pm
one easy way is instead of allowing a vlaue to be entered for your PONumber, make it a calcualted column instead:
CREATE TABLE Example(
ID int identity(1,1) primary key,
PONumber AS 'SomePrefix' +...
May 19, 2010 at 12:54 pm
Viewing 15 posts - 9,406 through 9,420 (of 13,461 total)