Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    13

    Exclamation Unanswered: loop through each table of my DB

    Is there a way to loop using a cursor in SQL-server so i can see if each columns of each tables that i loop through my DB have a specific string value and change it to something else, renaming the column if the match if correct.

    any threads that i can read from or website..

    thanx !!

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Won't you get there using:
    Code:
    SELECT * FROM INFORMATION_SCHEMA.COLUMNS
    -PatP

  3. #3
    Join Date
    Feb 2004
    Posts
    13

    Question How do i find a word in a string value

    Table name = nMontantBilletTVQ
    Table name = nMontantBilletTPS

    here an example of what i try to find.

    i would like to search the word 'TVQ' in my string 'nMontantBilletTVQ'

    is there a string functions for that ?? just cant get one working

    thanx

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Use LIKE.

    -PatP

Posting Permissions

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