Ideas for implementation

  • 11 years ago

    Hi Everyone,
    I have been given a task from work, and am wondering if anyone here could provide me with some ideas for the implementation of this project.


    Basically, I have been given the task of catologing our website keywords. We are a major player in the travel industry, and could have anywhere upto 100,000+ keywords at any one time. We use google adsense to manage our keywords (for google only) and from the web based interface, I can download keyword groups as a csv file. I want to write a program, which can load a csv file and insert all keywords into a MS SQL database table. This in itself is simple enough, but over our different marketing campagins, some key words may be repeated. So upon the loading of subsequent csv files, I only wish to add new enteries to the database table. (i.e enteries that do no exist in any other marketing campagin)

    I am not an experienced database programmer, and I am not sure of any way to do this, apart from loop through the whole database table checking if a single keyword already exists, so if anyone has any other suggestions on how I can do this efficiently, I would be more than grateful.

    Regards

  • 11 years ago

    Hi,

     

    You have to create a trigger to verify if the entry already exist and if exist cancel the insert statement.

     

    I’m working on something right know if you give me sometime I can help you.

     

    Good luck.

  • 11 years ago
    Hi,
    use this one

    If not exists
    (Select * from TableName Where FieldName=FieldValue)
        Insert Query statement
    GO









Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Memory is like an orgasm. It's a lot better if you don't have to fake it.” - Seymour Cray