File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL sintax

 
André Asantos
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys I am having the following problem:

When I use Sybase database I get to do this: select * from DatabaseCars.. TableKindOfCar it is the same to
select * from TableKindOfCar however you must be into that Database else does not work

but in my Mysql it does not work...

bye,
André AS
 
Jan Cumps
Bartender
Posts: 2576
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi André.
I'm trying to understand what you are doing, and what doesn't work. But I don't get it yet.
What is the difference between what happens in Sybase and what happens in MySQL?
 
André Asantos
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I am using Sybase the query "select * from DatabaseCars.. TableKindOfCar " works differently when I use Mysql because the same query does not work... got it?
 
Arpit Panwar
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
André Asantos wrote:When I am using Sybase the query "select * from DatabaseCars.. TableKindOfCar " works differently when I use Mysql because the same query does not work... got it?


Can you post the error you get
 
Jan Cumps
Bartender
Posts: 2576
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not yet , but working on it.

"DatabaseCars.. TableKindOfCar "

Is DatabaseCars the name of your schema?
Is TableKindOfCar the name of your table?
Why are there two dots and a blank between DatabaseCars and TableKindOfCar?
 
André Asantos
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right. The DatabaseCars is the name of Database that we are using right now and TableKindOfCar is the name of Table tha we are using.

So, about the dots I think that comes from Sybase syntax because it does not work in MySql... It is an interesting way to work because you can declare your database together during the select, got it?
 
Jan Cumps
Bartender
Posts: 2576
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you try if "DatabaseCars.TableKindOfCar" works (only a single dot between your schema name and table name)?

If it doesn't work, then post the complete and exact error message in this thread.
 
André Asantos
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow it is work perfectly you are the man! Thank you very very very much...

Thanks,
André AS
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic