Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Cannot use int as call method
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

annas
Starting Member

36 Posts

Posted - 03/20/2008 :  00:46:16  Show Profile  Send annas a Yahoo! Message  Reply with Quote
Haiii...


SELECT OrderID.OrderItem, Name.OrderItem, Price.OrderItem, OrderID.Orders

FROM OrderItem
INNER JOIN Orders
ON OrderID.OrderItem = OrderID.Orders


From the code what i trying to do is, called an order( OrderID, Name & price) if the OrderID are matches from two tables which is Orders and OrderItem.

When i run the query in sql server, it return error cannot use int
as called method. Is it really cannot use number or there are someother method that i still dont know yet.

Can anyone help me please...

Koji Matsumura
Posting Yak Master

141 Posts

Posted - 03/20/2008 :  01:27:47  Show Profile  Reply with Quote
ON OrderItem.OrderID = Orders.OrderID
Go to Top of Page

annas
Starting Member

36 Posts

Posted - 03/20/2008 :  11:22:13  Show Profile  Send annas a Yahoo! Message  Reply with Quote
Haiii..

Thank U Koji Matsumura for ur help. But it seems the error remain unchange "cannot call method on integer".

Can u or anyone in the forum help me...
Go to Top of Page

elancaster
A very urgent SQL Yakette

United Kingdom
1208 Posts

Posted - 03/20/2008 :  11:34:59  Show Profile  Reply with Quote
your identifiers are all a bit backwards apparently...

quote:

SELECT OrderID.OrderItem, Name.OrderItem, Price.OrderItem, OrderID.Orders

FROM OrderItem
INNER JOIN Orders
ON OrderID.OrderItem = OrderID.Orders



should be...


SELECT OrderItem.OrderID, OrderItem.Name, OrderItem.Price, Orders.OrderID

FROM OrderItem
INNER JOIN Orders
ON OrderItem.OrderID = Orders.OrderID


Em
Go to Top of Page

annas
Starting Member

36 Posts

Posted - 03/20/2008 :  11:41:38  Show Profile  Send annas a Yahoo! Message  Reply with Quote
Haii

Thank U very much elancaster, yes it did works. I didnt noticed i code it in a wrong way.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000