Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Proper syntax? - On (this date - annually) select/update this

Status
Not open for further replies.

Abeshome

Technical User
Oct 3, 2000
2
GB
L&G,
Writing a db for work and it's almost complete, however... 1 syntax seems to be holding up the wheels of progress. I'm sure this problem is relatively simple, but I continue to overlook the solution. Would appreciate your help with the proper syntax for the following Update Query:

On (January 10 of every year) select all records Like "" And "", Update to "None".

Thanks in advance for your time,
Abe

P.S. If you have experience with conversion to ASP pages...is the process difficult? Would eventually like to convert my db to web based. Opinions appreciated. [sig][/sig]
 
Hi Abeshome,

i'm not sure exactly what you mean, does a field contain the word portion > And < eg >Hand< if so the criteria would need tp be > Like &quot;*And&quot; < if you wanted > Anderson then
>Like &quot;And*&quot; < if you wanted >Hand< or >Anderson< then
>Like &quot;*And*&quot; <

if you mean like &quot;*something*&quot; And like &quot;*Another*&quot;

UPDATE LedgerAccounts
SET LedgerAccounts.LedgerHeading = &quot;This&quot;
WHERE (((LedgerAccounts.LedgerHeading)
Like &quot;*something*&quot; And (LedgerAccounts.LedgerHeading) Like &quot;*Another*&quot;));

it should work but i didn't want to run it,...

as for an a specific date you yould need to run the query on that date by code (or some dedicated operator ;-)

i may have missed the plot but without more specifics it's difficult to know exactly what you are intending to do.

HTH
Robert



[sig][/sig]
 
Robertd,

Thanks for the reply. I may not have communicated what I was looking for exactly correct. The true dilema rests with getting the query to run on January 10th of every year and NOT with the selection of records. Appreciate your insight though. If you (or anybody else ) has suggestions about this ...would appreciate the help...again.

Respectfully,
Abe [sig][/sig]
 
Hi Abe,

oh sorry about that, alright here is a posible suggestion setup an access database just for this event ie has the attached tables and &quot;the query&quot; etc maybe on the server add a scheduled task select monthly select the month(ie deselect all but jan) set the date and time to run.

in the mdb have it start up perhapes use a little code (set a startup form with the code to do this task) to prevent it running at the wrong time &quot;like if someone starts it accidently or something&quot; maybe even add a table to log its activities an hopefully this will do what you want!
also don't foreget to update this if the main database changes...
;-)
HTH
Robert [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top