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 |
jollygupta9
Starting Member
1 Post |
Posted - 2009-03-14 : 01:49:26
|
I have 2 tables:-Table 1 Table 2Date Hour Hour Id2008-08-01 Hr Hr 12008-08-02 Hr Hr 2 2008-08-03 Hr Hr 3Now, if I do inner join on Hour field my o/p shld be2008-08-01 1 Hr2008-08-01 2 Hr2008-08-01 3 Hr2008-08-02 1 Hr2008-08-02 2 Hr2008-08-02 3 Hr2008-08-03 1 Hr2008-08-03 2 Hr2008-08-03 3 Hrbut i am getting o/p like2008-08-01 1 Hr2008-08-01 2 Hr2008-08-01 3 Hr2008-08-02 1 Hr2008-08-03 1 HrCan anybody please let me know the reason. Thanks |
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2009-03-16 : 06:09:13
|
quote: Table 1 Table 2Date Hour Hour Id2008-08-01 Hr Hr 12008-08-02 Hr Hr 2 2008-08-03 Hr Hr 3
HUH?Please post the table definition for your tables (including data types) -- I can't tell which columns are in which tables.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-03-16 : 06:21:02
|
Also, If you can format your post. That'll be great. |
|
|
under2811
Constraint Violating Yak Guru
366 Posts |
Posted - 2009-06-04 : 09:30:22
|
select a.Date, b.Id, a.Hourfrom Table_1 a ,Table_2 border by 1 |
|
|
|
|
|