473,388 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Scan function??

How can I do this in Access? I can do it in 2 seconds in SQL but I
can't even get it to work in the SQL editor in Access

Date field is like this:
'2004 - 2006'

I just want to pull off the first year. I can do it with this code in
SQL:

Scan(Date, 1) as Start format $4.

Thanks!

Alex
Aug 4 '08 #1
2 3269
JvC
This should do it:

Trim(Left(MyDateString, InStr(MyDateString, "-") - 1))

Alex Pavluck explained on 8/3/2008 :
How can I do this in Access? I can do it in 2 seconds in SQL but I
can't even get it to work in the SQL editor in Access

Date field is like this:
'2004 - 2006'

I just want to pull off the first year. I can do it with this code in
SQL:

Scan(Date, 1) as Start format $4.

Thanks!

Alex

Aug 4 '08 #2
On Aug 3, 8:51*pm, JvC <johnv...@earthlink.netwrote:
This should do it:

Trim(Left(MyDateString, InStr(MyDateString, "-") - 1))

Alex Pavluck explained on 8/3/2008 :
How can I do this in Access? *I can do it in 2 seconds in SQL but I
can't even get it to work in the SQL editor in Access
Date field is like this:
'2004 - 2006'
I just want to pull off the first year. *I can do it with this code in
SQL:
Scan(Date, 1) as Start format $4.
Thanks!
Alex
Thanks so much!

This did it once I fixed a bug in Access
http://support.microsoft.com/kb/275110

Thanks again!
Alex
Aug 4 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Marcus | last post by:
Hi I have a very complex sql query and a explain plan. I found there is a full table scan in ID=9 9 8 TABLE ACCESS (FULL) OF 'F_LOTTXNHIST' (Cost=84573 Card=185892...
2
by: s_m_b | last post by:
<script language="javascript" src="/inc/js_popup_window.js" type="text/javascript"></script> <script language =" JavaScript" type="text/javascript"> function openScanWindow () {...
3
by: Carlos Moreno | last post by:
I can't find a reasonable explanation for this. I have a table game, with primary key gameid (an int). If I use a where involving gameid and <, or >, or <=, or >=, then I get a sequential...
6
by: robert | last post by:
just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan. hmmmm. next step up (or down, depending on your outlook)...
3
by: Tom Turner | last post by:
Here's the background on my situation. The question follows --- We have 600 units of mail going from our business to various Post Offices every morning. Every unit is accompanied by a paper...
2
by: gj_williams2000 | last post by:
Not sure if this is the right board but it is in c... I've got a console program written in c which receives key presses and gets a Windows Virtual key code. I am trying to convert it to the...
0
MMcCarthy
by: MMcCarthy | last post by:
This is a module that scans for files and folders on a specified path and describe them in comma separated values file in a text format. The information is stored in this file consecutively like:...
1
by: shilpasharma | last post by:
Hi, Can anybody let me know how I can optimise following Query. Select * from reports where ( exists ( SELECT 1 FROM results_required rr, item_claims_trials ict, results res WHERE...
2
by: BD | last post by:
Hi, all. My background is more Oracle than db2. My skills at SQL tuning are quite limited. I'm running 8.2 on Windows. I'm tasked with some SQL optimization, and am doing some explain plans...
0
by: zerge69 | last post by:
I programmed a port scanning module which you can download here http://code.google.com/p/portscan/ Including the module in your program allows you to scan specific ports in an IP, using the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.