Forum Replies Created

Viewing 15 posts - 3,616 through 3,630 (of 13,462 total)

  • RE: How to stop SSMS from adding database name to scripts

    just about everything is an option when it comes to scripting.

    in SQL2008 SSMS, go to Tools>>Options>>expand SQL Server Object Explorer>>Scripting.

    one of the options is "Script USE <database>

    in your case,...

  • RE: Naming Multi-Line Table-Valued Function Default Constraints

    just double checked, and i can create default constraints, but no check constraints on a table variable:

    declare @mytable table

    (id int identity(1,1) not null primary key,

    name varchar(30) unique,

    employee char(1) default...

  • RE: RESTORE DATABASE

    you can use a UNC path, assuming permissions for the network are in place:

    RESTORE DATABASE MyDatabase FROM DISK='\\LOWELLSMACHINE\c$\SQLBackups\2008Backups\MyDatabase.bak'

  • RE: Naming Multi-Line Table-Valued Function Default Constraints

    for table variables, you can create unique constraints, but you cannot name them.

    i don't think they allow default or check constraints either.

    only temp tables or regular tables will allow a...

  • RE: index scan

    sqlfriends (4/18/2013)


    Thanks, tried to add filter with where studentID=.. and schoolyear=.. this time it uses the index seek.

    The reason I asked this is because we have a view that is...

  • RE: NO SMTP Server Available

    you don't have to have a local smtp server; anyones mail server will do, including google, comcast or whoever you have an email account with.;

    I've set up google gmail ...

  • RE: Linked Server to MS Access

    as an aside, I have not gotten a linked server for access to work in SQL 64 bit / any version; against either a .mdb or .accdb

    i can get...

  • RE: In my laptop some times sqlserver getting problem while connecting in to the instance

    1. Don't uninstall and then reinstall. that's not going to help resolve the issue, even though it "seems" to.

    2. we really need the exact error you get. that tells us...

  • RE: how to check whether in the given column we have values in date format

    there is an ISDATE function in SQL as well;

    here's an example base don your post:

    /*

    /*

    Eid Variable Date? Converted?

    ---- --------- ----------- -----------------------

    1 ...

  • RE: Trigger issue, help with trigger

    Markus (4/17/2013)


    Great idea. I recreated the audit table just how you described and it works for inserts and updates.

    However, I have the trigger selecting the first column in the...

  • RE: query Suggestion please

    my version:

    note how i provided ready to paste-and-test code for the table and sample data?

    if you can do the same in the future, you will get much better, tested answers.

    With...

  • RE: Trigger issue, help with trigger

    chris.mcgowan (4/17/2013)


    Just create a foreign key between the audit table and source table on that column that will do the trick.

    Chris

    no foreign key for audit tables, usually, in my experience.

    ...

  • RE: Trigger issue, help with trigger

    if it were me, i would make it like this:

    i added an identity, and a column at the end with a default of getdate() so i know when the record...

  • RE: Trigger issue, help with trigger

    CONSTRAINT [PK_JOB_POSTING_AUDIT_1] PRIMARY KEY CLUSTERED

    you don't want that;

    since this is an audit table, the same pk in the primary table of course would be updated multiple times.

    the audit table...

  • RE: Logic creation

    you copied and pasted the exact same description, which apparently i misunderstood the first time.

    copying the same thing and pasting it again doesn't help at all.

    As I read it, the...

Viewing 15 posts - 3,616 through 3,630 (of 13,462 total)