Forum Replies Created

Viewing 15 posts - 16 through 30 (of 323 total)

  • RE: oops.... i deleted a table

    "i dont get y microsoft makes it so easy to delete tables"

    Hey if you choose to delete a table, who's microsoft to ask you twice!?

    Just be careful when you do...

  • RE: Preventing manipulation of data

    If you don't want Sysadmins being able to view the data, encrypt it, and don't tell them the key.

    Essentially all users of a system should have separate logins. If your...

  • RE: Restricting access from unapproved machines

    Different security groups would definately be the best way to go.

    Other than that, you can lock down a NIC with IP Sec to prevent unwanted traffic from accessing the box.

  • RE: thoughts on managing encryption keys

    If you are using Microsoft's Crypto API to do all your encryption, use the certificate store.

  • RE: How to ignore errors inside triggers

    your right. sorry, I've had my head stuck in a different problem all day. Ignore the whole @@ROWCOUNT thing, that has no place in a trigger.

    What you've written above looks...

  • RE: How to ignore errors inside triggers

    I wouldn't put any constraints on the Mirror / Audit Log tables.

    Think about it. All the constraints that were against the original table have already been applied before the trigger...

  • RE: declaring variables

    You need to make sure the value for name is quoted.

    BACKUP DATABASE Joe_LeninL

    TO DISK = 'K:\User_Databases\CFT_dbs\Data\Joe_LeninL\Joe_LeninL.bak'

    WITH INIT,

    NOUNLOAD,

    NAME = 'Joe_LeninL backup',

    NOSKIP ,

    STATS = 10,

    NOFORMAT

  • RE: Query using "IN" isn''''t working

    Performance would definately depend on your table sizes and and the number of matching rows.

    If a high percentage of your enrollments had userlessons then a JOIN would probably be as/more efficient.

    If...

  • RE: Query using "IN" isn''''t working

    According to the table at the end of that article IN is sargable. NOT IN is not sargable however.

  • RE: String Manipulation

    First, make sure that @Last_Match_Name is big enough to hold the longer string.

    Without knowing the surrounding code, there's two solutions:

    If you are in a loop of some sort:

    IF @Last_Char IS...

  • RE: We thought ADO had implicit transactions....

    By default SQL Server is set with implicit transactions off.

    If you want to have explicit transactions, you can either use the Ado.Connection objects BeginTrans, CommitTrans, and RollbackTrans methods.

    Alternatively you can...

  • RE: Query using "IN" isn''''t working

    alternatively you can remove the nulls from your subquery, and speed up the whole query with a distinct

    Select * from enrollment where LearnerID in (Select DISTINCT LearnerID from UserLessons WHERE LearnerID...

  • RE: Inserting todays date into a column

    GetDate() will return the current date and time.

    If you want just the date without the time:

    CAST( CONVERT( CHAR(8), GetDate(), 112) AS DATETIME)

  • RE: date format issues

    Most definately use ISO format. All date formatting functions (in t-sql, vba, access, etc) understand this the easiest.

    CONVERT(CHAR(8), datetime column, 112)

    will display an existing datetime/smalldatetime value in ISO format.

  • RE: Store executon time

    ooops.. my bad.. that was supposed to be CONVERT not CAST. I've fixed up the prior post.

    Indeed, if you need to keep the times so you can use them for...

Viewing 15 posts - 16 through 30 (of 323 total)