Viewing 15 posts - 2,776 through 2,790 (of 13,461 total)
my first guess is permissions; xp_cmdshell doesn't typically use the network permissions you expect.
run this command, and it can help you see if the user SQL uses for disk access...
December 16, 2013 at 6:13 am
and somethign from my snippets, which is grouping data into half hour intervals:
With MySampleData
(AgentID,State,StartTime,EndTime,Duration)
AS (
SELECT '1234','NotReady',Cast('2011-04-05 08:00:00' AS datetime),Cast('2011-04-05 08:00:05' AS datetime),'5' UNION ALL
SELECT '1234','Ready','2011-04-05 08:00:05','2011-04-05 08:01:00','55'...
December 13, 2013 at 1:02 pm
can you post the data as consumable sql stateemtns we can paste into SSMS, along with the datatypes?
something like this is an example
;WITH MyCTE([Times],[ACD],[Other],[Outb])
AS
(
SELECT '8:30AM','0:00:00','0:00:00','0:00:00' UNION ALL
SELECT '9:00AM','0:09:48','0:00:00','0:00:23' UNION ALL
SELECT...
December 13, 2013 at 1:00 pm
assuming you want AM/PM? here's a couple more examples; one keeps the milliseconds, the other is stuffed to remove the milliseconds to leave seconds +am/pm:
select right(convert(varchar,getdate(),131),14),
STUFF(right(convert(varchar,getdate(),131),14),9,4,'')
December 13, 2013 at 12:57 pm
select * from sys.server_principals
that will have domain users, as well as all the built in users; the sql_logins is a limited view of that same data(WHERE type_desc = 'SQL_LOGIN').
December 13, 2013 at 12:23 pm
can you see if you add the option for readonly, if it will work?
i have this saved in my snippets:
SELECT * FROM OPENROWSET('MSDASQL',
...
December 13, 2013 at 11:42 am
h.tobisch (12/13/2013)
use option (force order) when selecting from the view
note: eight year old thread.
December 13, 2013 at 11:38 am
cathy.baker (12/13/2013)
December 13, 2013 at 10:36 am
yes you can, SQL supports some regular expressions:
WITH
MyLastNames(LName) AS
(
Select 'DeCaprio@gmail' UNION ALL
Select 'Pitt[phone]' UNION ALL
Select 'Schwarzenegger(phone)' UNION ALL
Select 'Wahlberg' UNION ALL
Select 'Damon' UNION ALL
Select 'Willis'
)
SELECT
B.LName
FROM ...
December 13, 2013 at 9:50 am
you could create a temporary stored procedure.
whether you can do it through excel, i'm not sure, but thios example works just fine; your proc obviously woudl be more complex
CREATE PROCEDURE...
December 13, 2013 at 9:44 am
anoop.mig29 (12/11/2013)
At one of our client side we are not abled to get logged in sql server through windows login and we donot have sa pwd or any...
December 13, 2013 at 9:34 am
this generates the basics of what you are asking; you'll need to further filter on the datatype of the columns(text,image,bit, others?); the first version i tested returned an error for...
December 13, 2013 at 9:26 am
didn't notice this was for SQL2005, so the TIME datatype is out, but the other two converts i posted will work.
December 13, 2013 at 9:23 am
Dave i think the easiest is cast your datetime as TIME datatype, but here's a quick example of the three i could think of:
/*
create_date ...
December 13, 2013 at 9:21 am
darth.pathos 62444 (12/13/2013)
December 13, 2013 at 9:00 am
Viewing 15 posts - 2,776 through 2,790 (of 13,461 total)