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. Other Discussions
  3. IT & Infrastructure
  4. SQL issue

SQL issue

Scheduled Pinned Locked Moved IT & Infrastructure
databasesql-serversysadminhelpquestion
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.
  • P Offline
    P Offline
    pubududilena
    wrote on last edited by
    #1

    Hi All, there is a varchar value from SQL SERVER 2000 database like this originalvalue='ABV,ABZ,ACC,ADD,AGP,ALA,AMD,AMS,ANR,ATH,ATQ,AUH,AXD,BAH,BCN,BDQ,BER,BGO,BHX,BJM,BLL,BLQ,BLR,BOD,BOM,BRE,BRS,BRU,BTS,BUD,BUH,CAI,PAR,CAS,CCJ,CCU,CFU,CGN,CJB,CMB,COK,CPH,CPT,CTA,CWL,DAR,DBV,DEL,DLA,DMM,DOH,DUB,DUS,DXB,EBB,EDI,FBM,FIH,FLR,FRA,GLA,GOI,GOT,GVA,HAJ' Now There is a another varchar variabled called "ValueNew" like below. valueNew='BVA,CDG,JDP,JPU,LBG,ORY,POX,XDT,XEX,XGB,XPG,PAR' we need to check 'valueNew' airport codes are exists in the originalvalue or not.. How do we it with easy way? Thanks in advance..

    W 1 Reply Last reply
    0
    • P pubududilena

      Hi All, there is a varchar value from SQL SERVER 2000 database like this originalvalue='ABV,ABZ,ACC,ADD,AGP,ALA,AMD,AMS,ANR,ATH,ATQ,AUH,AXD,BAH,BCN,BDQ,BER,BGO,BHX,BJM,BLL,BLQ,BLR,BOD,BOM,BRE,BRS,BRU,BTS,BUD,BUH,CAI,PAR,CAS,CCJ,CCU,CFU,CGN,CJB,CMB,COK,CPH,CPT,CTA,CWL,DAR,DBV,DEL,DLA,DMM,DOH,DUB,DUS,DXB,EBB,EDI,FBM,FIH,FLR,FRA,GLA,GOI,GOT,GVA,HAJ' Now There is a another varchar variabled called "ValueNew" like below. valueNew='BVA,CDG,JDP,JPU,LBG,ORY,POX,XDT,XEX,XGB,XPG,PAR' we need to check 'valueNew' airport codes are exists in the originalvalue or not.. How do we it with easy way? Thanks in advance..

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      Why post this on General IT Issues? First decide which technology you want to use to solve this and then post on appropriate forum (General database, C# etc). One thing you have to consider is the design of your database. Now you're not using the db in a relational way. If you put the airport list into a separate table (1 record for each airport) you would easily test the existence of an airport.

      The need to optimize rises from a bad design.My articles[^]

      modified on Monday, December 8, 2008 2:20 PM

      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