SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Canada
    Posts
    730
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to insert a column values in existing db (msaccess 2000) table?

    Here's the link for the db table:
    http://k.domaindlx.com/gemetria/pageing.asp

    How do I insert a field of values?
    Compare bible texts (and other tools):
    TheWheelofGod

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what values are you trying to put in there? are they related to the other fields? because all i see is "test" data from what it looks like...if just an arbitrary value then loop through the rs(geoetria) ....a lil more detail please

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also...just in case you didn't know use an &nbsp; right before the </td> tags....ot will close your table calls if empty

  4. #4
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Canada
    Posts
    730
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As you see I have the rest of the data. All I need is the way to insert the fields' value.

    INSERT INTO table_name (column1, column2,...)
    VALUES (value1, value2,....)
    http://www.w3schools.com/sql/sql_insert.asp

    To answer your question, I have assigned numerical values to each letter or character:

    Code:
    Dim ans
    
    function getKeyValue_h(chr)
    	//A select statement is more efficient for this
    	select case chr
    	 case "a"
    		getKeyValue_h = 1 
    	 case "b"	
    		getKeyValue_h = 2 
    	 case "g"
    		getKeyValue_h = 3 
    	 case "d"
    		getKeyValue_h = 4 
    	 case "h"
    		getKeyValue_h = 5 
    	 case "w"
    		getKeyValue_h = 6 
    	 case "z"
    		getKeyValue_h = 7 
    	 case "x"
    		getKeyValue_h = 8 
    	 case "j"
    		getKeyValue_h = 9 
    	 case "y"
    		getKeyValue_h = 10 
    	 case "k","$"
    		getKeyValue_h = 20 
    	 case "l"
    		getKeyValue_h = 30 
    	 case "m","~"
    		getKeyValue_h = 40 
    	 case "n","!"
    		getKeyValue_h = 50 
    	 case "s"
    		getKeyValue_h = 60 
    	 case "["
    		getKeyValue_h = 70 
    	 case "p","@"
    		getKeyValue_h = 80 
    	 case "c","#"
    		getKeyValue_h = 90 
    	 case "q"
    		getKeyValue_h = 100 
    	 case "r"
    		getKeyValue_h = 200
    	 case "f","v"
    		getKeyValue_h = 300 
    	 case "t"
    		getKeyValue_h = 400
    	 case else
    		getKeyValue_h = 0
    	end select
    end function 
    
    function computeValue(str)
    	ans = 0
    	for i = 0 to len(str)
    		ans = ans + getKeyValue_h(mid(str,i+1,1))
    	next
    	computeValue = ans 
    end function
    And then in a column I put the formula:
    Code:
    <td size="200">
    <%Dim TheString, ArrayTemp, NumberOfWords, Word
    	TheString = rs("text_data")
    	ArrayTemp = split(TheString, " ")
    	NumberOfWords = UBound(ArrayTemp) + 1
    '	Response.Write "<P>The String is: " & TheString
     	Response.Write "<P><i>Number of words:</i> " & NumberOfWords
            Response.Write "<BR>Total=" & computeValue(TheString)	
    '	Response.Write "<P>Here are the words which compose that string: "
    	For Each Word In ArrayTemp
    	Response.Write "<BR><font size=""5"" face=""BSTHebrew"">" & word & "</font>="
    	response.write computeValue(word)
    	next
    
    %>
    
    </td>
    As an example:
    Code:
    |______________Text_________________|___Gemetria_____________|
    |__bravyt bra alhy~ at hvmy~ wat har#`___|___Number of words: 7
    |___________________________________| Total=2701
    |___________________________________| bravyt=913
    |___________________________________| bra=203
    |___________________________________| alhy~=86
    |___________________________________| at=401
    |___________________________________| hvmy~=395
    |___________________________________| wat=407
    |___________________________________| har#`=296
    I need to insert the values of "Gemetria" into the table.
    Compare bible texts (and other tools):
    TheWheelofGod


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
  •