SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: store procedure

  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up store procedure

    Hi ,
    I need some help from you guys. I am lost and not sure how to accomphish this. My experience is in vfp and I need to convert the following code into either stored procedures or some kind of dts package using activex script or vb. Since I am new to dts, should I be using dts or store procedures. What do I need to do in order for this code to be coverted into sql?

    Thanks alot for all the help!!!

    Select Counts
    go top
    do while .not. eof()
    replace count.counter with 1
    replace count.matchcode with ''
    do case
    case count.result $ "E101 ,E213 ,E600"
    replace count.keyfield with 'supp'

    case '' $ count.zip
    replace count.zip '0000'
    endcase
    IF seek(counts.id,"Flag")
    Select Flag
    do while count.id = flag.id
    do case
    case upper(flag.flag_code) 'del'
    replace count.matchcode with 'flag del'
    .
    .
    endcase
    enddo
    endif
    select count
    skip
    enddo

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,251
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    microsoft sql server, correct?

    wrong forum

    is there a database table involved in the above code?

    the only thing that remotely resembles SQL is "Select Counts" and "Select Flag"

    what is this code supposed to do?

    you mentioned DTS, is this supposed to be a data import routine?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, there is a database. The tables are in sql server 2000. This code suppose to loop through table call count replace some values in the count table, seek id from count in flag table and replace values in flag table. This code is written in vfp. The reason I mention dts, becasue I was wonder if I were to create a dts script to import the data would that be the best possible solution, or should I create a s.p? Just need some advise on how to accomplish this. What forum should I post this in?
    Thanks

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,251
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    the only other forum is called "Databases"

    this forum is for MySQL

    a moderator will move this thread for you soon
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

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