Split or Instr in SQL

Results 1 to 2 of 2

Thread: Split or Instr in SQL

  1. #1
    Join Date
    Dec 1969

    Default Split or Instr in SQL

    Hi,<BR> I have string in the format "1,2,3,4,5" all being primary ids<BR>which are referenced in more than one tables, I need to split the ids and check whether each individual id exists in the reference table else delete them. How do I do this<BR><BR>example<BR><BR>select * from table1 where id=1<BR>select * from table2 where id=1<BR>select * from table3 where id=1<BR><BR>select * from table1 where id=2<BR>select * from table2 where id=2<BR>select * from table3 where id=2<BR>

  2. #2
    Join Date
    Dec 1969

    Default which DB?

    SQL Server has string functions. look in Books Online<BR><BR>j<BR>http://www.atrax.ws/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts