Viewing 15 posts - 6,136 through 6,150 (of 13,469 total)
i tried to help and started scripting, but you simply didn't provide enough data.
you originally posted sample data with two columns...i had to dig thru your post to figure out...
January 5, 2012 at 7:37 am
try this: maybe the login is a sysadmin:
you'll need to change the name of the login to your specific login/sql user in question:
EXECUTE AS LOGIN='ThatSpecificSQLUser';
--the auditing snippet below...
January 5, 2012 at 6:31 am
Dave Ballantyne (1/4/2012)
Take a look at the plan and the active processes to see if you...
January 5, 2012 at 4:10 am
sysobjects :
you can either use SCHEMA_NAME(sys.objects.
object_id) from sys.objects
OR
JOIN sys.schemas ON sys.objects.schema_id = sys.schemas.schema_id)
January 4, 2012 at 2:24 pm
DavidL (1/4/2012)
January 4, 2012 at 2:22 pm
via TSQL, it's one of those really difficult things to do on your own.
Like Gus said, all the data is out there in the sys.tables/sys.columns metadata views, but it's up...
January 4, 2012 at 2:07 pm
something like this should do it in a single statement;
see if this does what you would like:
With FNames AS (
select distinct firstname from Customer),
LNames AS (
select distinct lastname from Customer),
Randomized...
January 4, 2012 at 1:40 pm
David, i think it has to do with CHAR(10) vs CHAR(13) + CHAR(10) as the line terminator.
SSMS will show you the definition the "right" way, regarless of the terminator, but...
January 4, 2012 at 1:04 pm
i think you want to use the NOT IN operator, right?
SELECT COUNT(*)
FROM IncidentRoles
WHERE IncidentID NOT IN(
SELECT RoleAssignment.IncidentRoleID
FROM RoleAssignment
WHERE IncidentRoleID IS NOT NULL)
January 4, 2012 at 12:59 pm
here's a full working example; like gail said, don't use this for passwords, only for preventing casual review of the raw data:
CREATE TABLE [dbo].[tbl1](
ID INT IDENTITY(1,1) NOT NULL PRIMARY...
January 4, 2012 at 10:02 am
yes, there's a suite of optiosn available starting in SQL 2005.
this is one of my favorite references for getting started in 2005 encryption:
the simplest to use is EncryptByPassPhrase:
--http://www.databasejournal.com/features/mssql/article.php/3714031/SQL-Server-2005-Encryption-types.htm
-- EncryptByPassPhrase(@password,@DataToEncrypt )
select...
January 4, 2012 at 8:45 am
erikpoker (1/4/2012)
SELECT
a.col1,
getForeignKey(a.col2, a.col3) as foreignKey,
a.col4,
a.col5
FROM table a
And within the getForeignKey function i can use openrowset to...
January 4, 2012 at 7:26 am
on top of what sturner said about doing homeowrk, there's a logical error in there using a while loop.
it's very possible that a database does not exist for every id...
January 3, 2012 at 11:06 am
i tested it on 2K5 and 2K8, with ARITHRABORT on and off in both instances(thinking that might be the issue) , and couldn't get it to throw the error;
my machines'...
January 2, 2012 at 2:43 pm
Viewing 15 posts - 6,136 through 6,150 (of 13,469 total)