Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Palermo
Starting Member
25 Posts |
Posted - 2010-12-29 : 20:40:11
|
Is it possible to use the between command to return data from multple tables? I have tables named :England_SummerEngland_WinterFrance_SummerFrance_WinterSELECT*FROM England_SummerWHERE Fee BETWEEN '0.00' AND '20.00'; Returns values from the England_Summer table but how do I return the values from all the tables in the database?SELECT*FROM England_Summer, England_WinterWHERE Fee BETWEEN '0.00' AND '20.00'; Gives this error :Msg 208, Level 16, State 1, Line 1Invalid object name 'England_Summer'. |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-29 : 20:47:50
|
| That's saying there's no object England_Summer.If they are the same structure why do you have 4 tables?Maybeselect * from England_Summer WHERE Fee BETWEEN '0.00' AND '20.00'union allselect * from England_Winter WHERE Fee BETWEEN '0.00' AND '20.00'==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-04 : 12:51:07
|
First check if you've table called England_Summer available on same dbSELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'England_Summer' ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
MageshkumarM
Yak Posting Veteran
61 Posts |
Posted - 2011-01-05 : 08:28:40
|
Can you pls look at the database name is correct and check there that table available or not..!MAG,Start with the new Idea.. |
 |
|
|
|
|
|