Viewing 15 posts - 61 through 75 (of 79 total)
Hey John Mitchell I took your advice and included PARTITION BY which has worked perfectly, thanks for the advice
Sample
SELECT 'PL01_'+ RTRIM(Vendor) + '_' + RTRIM(Shipto) + '_'+RTRIM(CONVERT(char(20),GETDATE(),112))+'_'+CONVERT(CHAR(8),SYSDATETIME(),114)AS[Document No]
,Ltrim((RIGHT(REPLICATE('0',...
June 20, 2011 at 1:58 am
Hi
I would like to make slight chances to the code above i still want it to increment by 10 but to be unique according to the
Vendor and Shipto...
June 17, 2011 at 8:43 am
Not to worry I've sorted it out
[Code]
RIGHT(REPLICATE('0', 5) + CONVERT(VARCHAR(10), ROW_NUMBER()over(Order by P.Vendor)+0) + '0', 5) AS [Document Item No]
[/Code]
Thanks a lot for your help
June 16, 2011 at 1:30 pm
Many Thanks for your reply Ninja's_RGR'us
I need it to start from 00010, 00020 00030 etc could you show me how that's done
June 16, 2011 at 1:26 pm
Does anyone know how i can create an AUTO INCREMENT column WITHOUT incorporating it when creating a table.
The same results I posted above but create another column lets say...
June 15, 2011 at 2:04 am
Phil , Calvo, Chaz many thanks for your reply
Phil , Calvo both of your were nearly right, from your scripts i was able to construct what i needed...
June 14, 2011 at 7:18 am
This is exactly what i was looking for myself thanks for the post
June 10, 2011 at 9:55 am
Thanks for the post it worked perfectly
June 10, 2011 at 8:54 am
Just a quick one I want to Current_Stock by Standard_Cost for example, Standard_Cost * current_stock i was sure this could of been done within StockSafety_CTE. I'm assuming...
June 8, 2011 at 3:42 pm
Right i understand it perfectly now I just need to incorporate the caluculation in the StockSafety_CTE section of the code not add another CTE brilliant. Thanks alot for the help...
June 8, 2011 at 2:24 pm
Oh wow that was quick thanks alot for writing that for me and the Forum Etiquette
I want to use CURRENT_ABC_WEEKS to perform similar calculation roughly 4 more.
Would i need...
June 8, 2011 at 2:11 pm
Hi opc.three
Sorry for the delay
Table 1
-- Inserting data in Lim_ABC_Table
CREATE TABLE [dbo].[Lim_ABC_Table](
[ITEM] [varchar](50) NULL,
[BU] [int] NULL,
[SUBFAMILYDESC] [varchar](50) NULL,
[SUBFAMILYCODE] [varchar](50) NULL,
[CURRENTABC1] [varchar](50) NULL,
[LASTMONTHSIX] [int] NULL,
[STANDARDCOST] [decimal](18, 2) NULL,
[CURRENTABC] [varchar](10) NULL,
[CURRENTSIXMONTHSFORECAST]...
June 8, 2011 at 1:46 pm
Can you show me how you would code this as i'm not to sure how
June 8, 2011 at 12:40 pm
opc.three many thanks for your reply and comments much apprenciated
I took your advice and used the Case expression as i found it more easier to code
SELECT ...
June 8, 2011 at 11:52 am
Thansk for your reply GilaMonster , skcadavre
To be honest i dont know where i didnt think of that lol, i'll try that now
June 6, 2011 at 9:32 am
Viewing 15 posts - 61 through 75 (of 79 total)