Viewing 11 posts - 1 through 11 (of 11 total)
SELECT CAST(CAST(datefield AS DATE) AS DATETIME)
FROM datetable
January 15, 2015 at 12:09 pm
HI tri_hartanto,
First, It's so fuzzy to understand what you are trying to do.
Please furnish table structure with sample data and with your intended Result Set/Table and describe what you trying...
July 15, 2014 at 3:15 pm
Try this....
CREATE PROCEDURE [cost].[Ingredient_Cost_Comparison]
(
@CustomerNumber_BillToNVARCHAR(20)
,@CurrentSalesQuoteNumberNVARCHAR(20)
,@PriorSalesQuoteNumberNVARCHAR(20)
,@CurrentItemNumber1NVARCHAR(20)
,@PriorItemNumber1NVARCHAR(20)
,@CurrentItemNumber2NVARCHAR(20)
,@PriorItemNumber2NVARCHAR(20)
,@CurrentItemNumber3NVARCHAR(20)
,@PriorItemNumber3NVARCHAR(20)
--,@CurrentItemNumber4NVARCHAR(20)
--,@PriorItemNumber4NVARCHAR(20)
--,@CurrentItemNumber5NVARCHAR(20)
--,@PriorItemNumber5NVARCHAR(20)
)
AS
BEGIN
SELECT DISTINCT
s.CustomerNumberAS 'CurrentCustomerNumber_BillTo'
,s.SalesQuoteNumberAS 'CurrentSalesQuoteNumber'
,s.SalesQuoteLineNumberAS 'CurrentQuoteLineNumber'
,s.ItemNumberAS 'CurrentItemNumber'
,s.ItemDescriptionAS 'CurrentItemDescription'
,s.ComponentItemNumberAS 'CurrentComponentItemNumber'
,s.ComponentItemDescriptionAS 'CurrentComponentItemDescription'
,s.ComponentItemLevelAS 'CurrentComponentItemLevel'
,s.BOMQuantityAS 'CurrentBOMQuantity'
,s.BOMUnitOfMeasureAS 'CurrentBOMUnitOfMeasure'
,s.CostTypeUsedAS 'CurrentCostTypeUsed'
,s.CostMaterialWorksheetAS 'CurrentCostMaterialWorksheet'
,s.CostMaterialMarketExtendedAS 'CurrentCostMaterialMarketExtended'
,s.RequestedDeliveryDateAS 'CurrentRequestedDeliveryDate'
INTO #Current
FROM dw.cost.vStd_SalesQuoteCostLineBOM s (NOLOCK)
WHERE s.CustomerNumber IN...
July 15, 2014 at 1:33 pm
Yaahhh huuu... I Got it.. I found where I'm doing mistake. The culprit is local temp table. Yes while we are using BCP command it create a new connection because...
August 24, 2010 at 12:38 pm
No its not working either with .BAK. I don't think it would be a problem with .bak but some thing I'm doing wrong with temp table. Any how it would...
August 24, 2010 at 9:58 am
Most oftenly Nonclustered indexes are created on a columns where those are columns are heavily used in query's to improve the query performance. especially where Clustered index columns are not...
July 16, 2010 at 3:27 pm
Got it. Thank you for your response
July 15, 2010 at 10:23 am
I'm not clear on your reason. Could you explain little further.Assume that the data inserting in clustered & non clustered index tables are different.
July 15, 2010 at 10:15 am
Thanks for all the reply's. I will try to implement.. I will get back if its still a problem... Thank you all
June 14, 2010 at 9:45 am
Viewing 11 posts - 1 through 11 (of 11 total)