Update query

  • Thread starter Thread starter ppc
  • Start date Start date
P

ppc

Hi
I want to write a query for updating only certain characters from a field to
a field in new table.

Table 1
Fieldname=ScripName contain first record aban offshore#www.aban.com

Now I want to update table2.ScripName=<All characters before #>

How to do this?

regds,

prasanna
 
Please be more specific about your request. Do you want to update the field
in the new table or append records to the new table? Does the table exist or
must it be created? Does every value of ScripName contain a "#"?

There are many string functions such as Instr() and Left() which should at
least identify and return the characters to the left of "#".
Left(ScripName, Instr(ScripName & "#","#")-1)
 
Ya table1 already exists.Using the iif statement i am able to do that but now
i changed my requirement.Basically i am importing from a html table in that
the column of scripname contains all hyperlink records.I want to import all
those hyperlink records in the access table with field ScripName
Is it possible.?

Thanks in advance.

regds

prasanna

Duane said:
Please be more specific about your request. Do you want to update the field
in the new table or append records to the new table? Does the table exist or
must it be created? Does every value of ScripName contain a "#"?

There are many string functions such as Instr() and Left() which should at
least identify and return the characters to the left of "#".
Left(ScripName, Instr(ScripName & "#","#")-1)
Hi
I want to write a query for updating only certain characters from a field to
[quoted text clipped - 10 lines]
 
You "changed ... requirement". Does that mean since your previous post? I
don't see any "iif statement" from any earlier post.

Did you try/understand the expression that I suggested?

--
Duane Hookom
Microsoft Access MVP


ppc via AccessMonster.com said:
Ya table1 already exists.Using the iif statement i am able to do that but now
i changed my requirement.Basically i am importing from a html table in that
the column of scripname contains all hyperlink records.I want to import all
those hyperlink records in the access table with field ScripName
Is it possible.?

Thanks in advance.

regds

prasanna

Duane said:
Please be more specific about your request. Do you want to update the field
in the new table or append records to the new table? Does the table exist or
must it be created? Does every value of ScripName contain a "#"?

There are many string functions such as Instr() and Left() which should at
least identify and return the characters to the left of "#".
Left(ScripName, Instr(ScripName & "#","#")-1)
Hi
I want to write a query for updating only certain characters from a field to
[quoted text clipped - 10 lines]
 
Using the following i got what i wanted.
Trim(IIF([ScripName] Like "*#*", Left([ScripName],
Instr(1,[ScripName],"#")-1),[ScripName]))
But as i said earlier i changed my requirement and now i want the hyperlink
from html table to be imported to my access table.That also accomplished by
just changing the type of field from "Text" to "Hyperlink"

regds,

prasanna

Duane said:
You "changed ... requirement". Does that mean since your previous post? I
don't see any "iif statement" from any earlier post.

Did you try/understand the expression that I suggested?
Ya table1 already exists.Using the iif statement i am able to do that but now
i changed my requirement.Basically i am importing from a html table in that
[quoted text clipped - 21 lines]
 
Back
Top