Yorkshire Divers

Deep Blue Technical
Go Back   YD Scuba Diving Forums > Non-Diving Related Forums > Technology
User Name
Password

Welcome to the YD Scuba forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Technology: Discuss Using MS query in the Non-Diving Related Forums forums: I am having a few issues using the MS Query tool within Excel I am trying to extract the 7 ...

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 13-06-07, 02:55 PM
Ian@1904's Avatar
Team Starburst
 

Join Date: Jan 2004
Location: Bedfordshire
Posts: 4,078
Ian@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the water
Using MS query

I am having a few issues using the MS Query tool within Excel
I am trying to extract the 7 digits on the left (vehicle reg) out of a data field named narrative

In the query in a new column I entered
Reg:left([narrative],7)

and several variations but just obtain syntax errors. Any ideas on a way round this, or what am I doing wrong
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 13-06-07, 03:03 PM
Adrian Kelland's Avatar
Newbie DO
 

Join Date: May 2003
Location: Exeter
Posts: 8,803
Adrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the water
This might be the kind of question where the data is the problem, rather than the function use. Are all fields full, how will it handle nulls etc.
__________________
Interviewer; 'Think of a number between 1 and 10'
Me; 'e'
YD Fundraising 2007/8 - Amount Raised Royal National Lifeboat Institution UK Transplant Register Exeter BSAC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 13-06-07, 03:16 PM
Ian@1904's Avatar
Team Starburst
 

Join Date: Jan 2004
Location: Bedfordshire
Posts: 4,078
Ian@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the water
Data

Quote:
Originally Posted by Adrian Kelland
This might be the kind of question where the data is the problem, rather than the function use. Are all fields full, how will it handle nulls etc.
All fields contain data of some form usual a 7 digit reg and sometimes the model eg KV07XXA Audi A6
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 13-06-07, 03:18 PM
Garf's Avatar
Chimp 2
 

Join Date: Aug 2003
Location: West Sussex
Posts: 6,113
Garf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gills
what's the field type ian.
__________________
Garf
Postatem obscuri lateris nescitis.
www.teamfoxturd.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 13-06-07, 03:18 PM
Adrian Kelland's Avatar
Newbie DO
 

Join Date: May 2003
Location: Exeter
Posts: 8,803
Adrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the waterAdrian Kelland is never out of the water
I'd have a good look at the entires that cause the problem Ian. If the syntax is right for some of them, then it is probably the data that is the problem. Is it a lot of data?
__________________
Interviewer; 'Think of a number between 1 and 10'
Me; 'e'
YD Fundraising 2007/8 - Amount Raised Royal National Lifeboat Institution UK Transplant Register Exeter BSAC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 13-06-07, 03:22 PM
Garf's Avatar
Chimp 2
 

Join Date: Aug 2003
Location: West Sussex
Posts: 6,113
Garf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gillsGarf was born with gills
I just connected to an access database using ms query

I selected all the fields from the table and then went and edited the SQL

I added left(tablename.fieldname,7)

and this worked

then I edited the SQL again and changed it to be

left(tablename.fieldname,7) AS FIELDDESCRIPTIONIWANT

and this worked

hope that helped
__________________
Garf
Postatem obscuri lateris nescitis.
www.teamfoxturd.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 13-06-07, 04:02 PM
Ian@1904's Avatar
Team Starburst
 

Join Date: Jan 2004
Location: Bedfordshire
Posts: 4,078
Ian@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the waterIan@1904 is never out of the water
sorted

Quote:
Originally Posted by Garf
left(tablename.fieldname,7) AS FIELDDESCRIPTIONIWANT

and this worked

hope that helped
Thank you, sorted. A little bit of knowledge goes a huge long way.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Sponsored Links

Yorkshire Divers - RSS Feed
All times are GMT +1. The time now is 03:09 AM.
Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Trademark and all rights reserved : © YD.com Ltd (2006)
YD.com Ltd (Registered in England - 05886696)
Other sites : Golf Clubs | New Premiership Football Kits | MP3 Portable Players | MP3 Players For Sale | Replica Football Kits | Cheap Football Boots

Forums Directory