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 |
|
mrgalvan
Starting Member
9 Posts |
Posted - 2006-08-02 : 12:24:30
|
| I'm trying to create a view, but recieved this error. I'm running throught, just a select statment before I create view. 'Int' not a function name... WHY NOT!Here is my statement:SELECT I.ItemID, D.ShortDesc, I.CompanyID, BI.QtyOnHand, WB.WhseBinID, W.WhseIDFROM timItem I INNER JOIN timitemdescription D (nolock) ON I.ItemKey = D.ItemKey INNER JOIN timWhseBinInvt BI (nolock) ON I.ItemKey = BI.ItemKey INNER JOIN timWhsebin WB (nolock) ON BI.WhseBinKey = WB.WhseBinKey INNER JOIN timWarehouse W (nolock) ON WB.WhseKey = W.WhseKey --INNER JOIN tsoSOLineDist SL ON W.WhseKey = SL.WhseKey --INNER JOIN tsoSOLine SOL ON I.ItemKey = SOL.ItemKey AND BI.ItemKey = I.ItemKeyWHERE BI.QtyOnHand > '0' and I.ItemId = '22858' and Int(Left(WhseBinID,2))GROUP BY I.ItemID, D.ShortDesc, I.CompanyID, WB.WhseBinID, W.WhseID, BI.QtyOnHand |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2006-08-02 : 12:30:21
|
| because it wants you to use CONVERT, this being T-SQLFor fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
mrgalvan
Starting Member
9 Posts |
Posted - 2006-08-02 : 13:02:03
|
| There are bin locations that are numeric and bin locations that are name, ie group bin or 97-108-32. I just want to get the bin locations that are numeric. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-04 : 03:58:52
|
Maybe something like this?SELECT DISTINCT I.ItemID, D.ShortDesc, I.CompanyID, BI.QtyOnHand, WB.WhseBinID, W.WhseIDFROM timItem IINNER JOIN timitemdescription D (NOLOCK) ON D.ItemKey = I.ItemKeyINNER JOIN timWhseBinInvt BI (NOLOCK) ON BI.ItemKey = I.ItemKeyINNER JOIN timWhsebin WB (NOLOCK) ON WB.WhseBinKey = BI.WhseBinKeyINNER JOIN timWarehouse W (NOLOCK) ON W.WhseKey = WB.WhseKeyWHERE BI.QtyOnHand > '0' AND I.ItemId = '22858' AND LEFT(WB.WhseBinID, 2) LIKE '[0-9][0-9]' Peter LarssonHelsingborg, Sweden |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-08-04 : 09:14:06
|
| orWB.WhseBinID LIKE '[0-9][0-9]%'MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|