Viewing 15 posts - 16 through 30 (of 212 total)
This statement simply encrypts EXISTING SSNs:
OPEN SYMMETRIC KEY Key_01
DECRYPTION BY CERTIFICATE DatabaseA01
UPDATE dbo.TableA
SET SSN = ENCRYPTBYKEY(KEY_GUID('Key_01'), SSN)
CLOSE SYMMETRIC KEY Key_01
If new records are being encrypted as they are added, you...
May 30, 2012 at 9:38 am
Encryption on a column can't be 'turned off.' It's the values in the field that are encrypted, not the column itself. You are probably storing the encrypted SSNs...
May 30, 2012 at 9:05 am
Here's an example without a TRY...CATCH block:
IF 1=1
BEGIN
;THROW 51000, 'The record does not exist.', 1;
END
May 30, 2012 at 8:02 am
Try putting a semicolon right before the THROW statement, like:
BEGIN CATCH
;THROW
END CATCH
May 30, 2012 at 7:54 am
Yes. You can also do it inline like this:
SELECT
xml_column.query('declare namespace ns="http://webservice.nada.com/"; data(//VehicleValue_Struc/ns:VehicleYear)[1]') AS vehicle_year
FROM
vehicles
WHERE
id = 10
And you are welcome
May 24, 2012 at 3:27 pm
;WITH xmlnamespaces (N'http://webservice.nada.com/' as ns)
SELECT
xml_column.value(N'(//VehicleValue_Struc/ns:VehicleYear)[1]',N'nvarchar(100)') AS vehicle_year
FROM
vehicles
WHERE
id = 10
OR:
;WITH xmlnamespaces (N'http://webservice.nada.com/' as ns)
SELECT
xml_column.query(N'data(//VehicleValue_Struc/ns:VehicleYear)[1]') AS vehicle_year
FROM
vehicles
WHERE
id = 10
May 24, 2012 at 3:10 pm
You could set up a login trigger to fire a proc on login that contained appropriate logic. However, any other procs that were executed by a login may have...
May 24, 2012 at 9:31 am
BGM (5/24/2012)
err.. thank you for being so terse? :hehe:I guess the obvious follow up question is how the crap does checksum() work then?
Cheers!
I think this might give you some...
May 24, 2012 at 8:06 am
I would expect a single transaction log backup when using APPEND, and I'd expect the transaction log backup to grow each hour, until it was replaced by a new backup...
May 24, 2012 at 7:16 am
SELECT datediff(mm, dateadd(mm, 48, ADOPTION), getdate()) AS MonthsPastDue
FROM EOP
May 23, 2012 at 12:40 pm
Do you have a backup? Have you tried the REPIAR_ALLOW_DATA_LOSS option with DBCC CHECKTABLE? If you have a current backup, I would restore the database to a NEW...
May 17, 2012 at 7:42 am
bpowers (5/15/2012)
May 15, 2012 at 3:58 pm
kf2012 (5/11/2012)
Sorry I am a newbie in CTE and have seen this:http://www.sqlservercentral.com/articles/CTE/67974/
A script for doing what I asked would be greatly appreciated.
Thanks.
Why do you have to use a...
May 11, 2012 at 12:02 pm
Viewing 15 posts - 16 through 30 (of 212 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy