Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

SQL sintax

 
Ranch Hand
Posts: 234
  • 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
 
Bartender
Posts: 2658
19
Netbeans IDE C++ Linux
  • 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
  • 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?
 
Greenhorn
Posts: 12
  • 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: 2658
19
Netbeans IDE C++ Linux
  • 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
  • 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: 2658
19
Netbeans IDE C++ Linux
  • 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
  • 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
 
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic