[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

What criteria would I use for my ODBC query

Posted on 2013-06-17
3
Medium Priority
?
292 Views
Last Modified: 2013-07-16
I have an ODBC query pulling my data. One of the columns with data looks has 5 numbers, a slash (/), then 6 more numbers. I need to create criteria for both the 5 numbers before the slash and another criteria for the 6 numbers after the slash. So the data looks like this, 11111/222222. So, I need 2 criterias pulling the same column. One criteria i would put 11111, the other criteria i would put 222222. I thought i would use the function "Like", but that isn't working for some reason. I can't use criteria with Begins With or Ends With. How would i accomplish this??? Thanks!
0
Comment
Question by:brasiman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Accepted Solution

by:
ianmills2002 earned 1000 total points
ID: 39255084
In your query you can use the SUBSTRING() function

....
AND SUBSTRING(column, 1, 5) = '11111'
AND SUBSTRING(column, 6, 6) = '222222'
....
0
 
LVL 24

Assisted Solution

by:Steve
Steve earned 1000 total points
ID: 39255394
You should be able to use Like:

column LIKE '11111/%' OR column LIKE '%/222222'
(Have used OR as not sure if AND is correct)
0
 

Author Comment

by:brasiman
ID: 39330473
They actually both work for how i was wanting to use it. Thank you!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question