Returning the leftmost character using SQL in excel

darrenfinlayson

New Member
Joined
Feb 26, 2004
Messages
13
Good morning / afternoon / evening whereever you are!

i am pulling data from lotus notes into excel using:

import external data / new database query

i have got the results tweaked exactly how i want them to be but 1 thing. i would like to tell query to only return the leftmost character to excel, of a field that i am importing from notes. is this possible?

i have worked with criteria, and i can display data were the leftmost character = x but i cant seem to return x. i know you can use the formula =left(a1, 1) withing excel but this would then need to be in another column right?

thanks for listening, have a nice day!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hey Darren

You could write your SQL statement in such a way that the system returns just the Left() portion of a WHERE statement filter, like so...


Code:
SELECT Left([Name],1) From Table1 WHERE Name LIKE 'x*'

That way you will only get the leftmost letter/Number from the name where the entire name matches your WHERE statement, in this case all records that start with x.


Try that

anvil19
:eek:

P.S. I am not familiar with Lotus Notes, so excuse me if you don't use SQL to run queries.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top