Viewing 15 posts - 2,776 through 2,790 (of 13,469 total)
I think you'd just extend the WHERE statements in the query to also compare the @RoleId :
how about this?
and g.ID in
(Select ID From Groups
...
December 16, 2013 at 9:23 am
5.5.1 implies you did not set up your db mail to send the basic authentication to have the username and password:

December 16, 2013 at 7:58 am
jeganbenitto.francis (12/16/2013)
i have a row as below
1 AAAA BBBB CCCC DDDD EEEE FFFF GGGG HHHH
I...
December 16, 2013 at 7:18 am
whoops i cross posted from anotehr post;
can you show us /script out your linked server?
that would help us diagnose the issue for you.
December 16, 2013 at 6:50 am
look at the stored procedure in question...i'd bet it is referencing a linked server. the login is failing at the linked server because whoever is calling it doesn't have mapped...
December 16, 2013 at 6:21 am
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
Viewing 15 posts - 2,776 through 2,790 (of 13,469 total)