SQL issue
-
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..
-
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..
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