MS SQL Server Trigger
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: MS SQL Server Trigger

  1. #1
    Join Date
    Oct 2010
    Posts
    43

    Unhappy MS SQL Server Trigger

    Hello Database Masters:


    Im a newbie to the SQL server world, basically I have a table with 3 column
    CountryID, CountryName and Currency in the insert i will just insert two values for CountryName and Currency
    and the CountryID will populate automatically using a trigger eg: CYYYYMMDDHHSS(Code|Year|Month|Day|Hour|Seconds)

    Can some expert help me with my problem?


    Regards,
    MC

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,392

    Re: MS SQL Server Trigger

    What is the type of CountryID? Is it unique or not?
    What is "Code"? Where does it come from?
    Why are you going to use a trigger? Why not just calculate this "CYYYYMMDDHHSS" ID while inserting a new record?
    Victor Nijegorodov

  3. #3
    Join Date
    May 2009
    Location
    Surrey, UK
    Posts
    285

    Re: MS SQL Server Trigger

    Or why not using the more suitable and standard ISO codes? (see ISO 3366 and ISO 4217)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center