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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-10-10 : 15:22:31
|
| Kent writes "I cannot save this query to run it, it doesn't want to be conjegated, can you do the convert function on a variable? Your help would be greatly appreciated. I am using SQL Server 7.0 no service packs apply, my Windows version is Windows 2000 sp2CREATE PROCEDURE qryGetGPSSalesDataP1 @BeginDate datetime, @EndDate datetimeASINSERT INTO DailyTrans ( CustNmbr, TranDate, TranType, Itmclscd, Class, Price, Qty )SELECT * FROM OPENQUERY(PARIS,'SELECT LTRIM(RTRIM(CUSTNMBR)) AS Expr1, DOCDATE, LTRIM(RTRIM(Sale_Type)) AS Expr2, LEFT(LTRIM(RTRIM(ITMCLSCD)), 4) AS Expr3, LTRIM(RTRIM(ITMCLSCD)) AS Expr4, Sales, QtyFROM dbo.PVI_DW_D_Cust_IVClass_SaleTypeWHERE DOCDATE BETWEEN' + CONVERT(varchar(12), @BeginDate) + ' AND ' + CONVERT(varchar(12), @EndDate))" |
|
|
|
|
|
|
|