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

    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?


  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Hanover Germany

    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
    Lincs, UK

    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

On-Demand Webinars (sponsored)