Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Checking if New or Not?

Checking if New or Not?

Scheduled Pinned Locked Moved ASP.NET
databasetutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sk_ko
    wrote on last edited by
    #1

    I want to insert one value to sql database table. when inserted, I want to check if this value is already stored in database table. if the present value is already in database, I want to show message box or something notification to user. if the present value is new one, it will be inserted to database. So, how to check for this condition? I want to check the present inserting value against all inserted value in database.

    J 1 Reply Last reply
    0
    • S sk_ko

      I want to insert one value to sql database table. when inserted, I want to check if this value is already stored in database table. if the present value is already in database, I want to show message box or something notification to user. if the present value is new one, it will be inserted to database. So, how to check for this condition? I want to check the present inserting value against all inserted value in database.

      J Offline
      J Offline
      Jain Vijay
      wrote on last edited by
      #2

      If Not Existes(Select fieldname From tablename Where fieldname=yourvale)
      Begin
      --data NOT exists
      End
      Else
      Begin
      --data ALREADY exists
      End

      hope this will help

      Regards... Vijay Jain :)

      "One thing you can't recycle is wasted time."

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups