Source language: Translate to:

SQL

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

SQL

Postby Alex » Sun Oct 12, 2008 12:15 pm

Hi,

It is possible to search two word with the command:
Code: Select all
dbpExecSQL "DB" "SELECT * FROM DB WHERE Info1 LIKE [#34]%eat%[#34] AND SELECT * FROM DB WHERE Info1 LIKE [#34]%banane%[#34]" ""

Because when I do that, it doesn't work!

Why?

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Rasl » Sun Oct 12, 2008 2:52 pm

dbpExecSQL "DB" "SELECT * FROM DB WHERE Info1 LIKE [#34]%eat%[#34] OR Info1 LIKE [#34]%banane%[#34]" ""

salu2
Rasl
 
Posts: 129
Joined: Sat Apr 02, 2005 8:25 am
Location: Buenos Aires, Argentina

Postby Alex » Sun Oct 12, 2008 3:39 pm

Hello Rasl,

Can't I use AND?

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Rasl » Sun Oct 12, 2008 5:34 pm

Yes, all depends on what you want to ask and obtain

salu2
Rasl
 
Posts: 129
Joined: Sat Apr 02, 2005 8:25 am
Location: Buenos Aires, Argentina

Postby Alex » Mon Oct 13, 2008 1:11 am

Hi,

I want to see if the two words are on the same line of my DataBase.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby dpayer » Mon Oct 13, 2008 6:45 am

Alex wrote:Hi,

I want to see if the two words are on the same line of my DataBase.

Thanks


Alex


Don't do two separate selects in your statement.

Try:
Select * from TABLE where ('something = this' AND 'something = that')

David P
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby Alex » Mon Oct 13, 2008 11:00 am

Hi dpayer,

Thanks for your code, but it doesn't work, this is my code:
Code: Select all
    dbpExecSQL "DB" "Select * from DB where ('Info1 LIKE [#34]%[Words]%[#34]' AND 'Info1 LIKE [#34]%[Words2]%[#34]')" ""


it is possible to add more research code ?

Code: Select all
dbpExecSQL "DB" "Select * from DB where ('Info1 LIKE [#34]%[Words]%[#34]' AND 'Info1 LIKE [#34]%[Words2]%[#34]' AND 'Info1 LIKE [#34]%[Words3]%[#34]')" ""


Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Alex » Tue Oct 14, 2008 9:14 pm

Hi,

Can anybody help me?

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby smartmedia » Tue Oct 14, 2008 11:44 pm

Alex,

Entering sql syntax tutorial at google or any other search engine i am sure you can find a lots of it. I have found this http://www.infogoal.com/sql/ you can check it out.
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Alex » Wed Oct 15, 2008 5:57 am

Hi smartmedia,

Thanks, I gorgot that I can do that. Thanks a lot.


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

About searching two words

Postby carlos torres » Thu Oct 16, 2008 1:22 am

Dear Alex

I think you can find here a good answer

http://www.functionx.com/access/

regards

carlost
User avatar
carlos torres
 
Posts: 289
Joined: Mon May 02, 2005 8:14 am
Location: Pamplona, Colombia

Postby Alex » Thu Oct 16, 2008 2:46 am

Hi carlos torres,

Excellent, exactly what I need thanks a lot.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest