Viewing 15 posts - 46 through 60 (of 92 total)
thanks, i'm nearly there. It's always using the earliest cost though. it now shows....
Year.........MonthNo.....Volume.....Cost
2013........1................5000........1
2013........2................4000........1
2013........3................5000........1.5
2013........4................2000........1
2013........5................5000........1
2013........6................3000........1
2013........7................7000........1
2013........8................5000........1.6
2013........9................3000........1
2013........10................7000........1
.....
and here's the ddl (query is at the end)....
--drop tables
IF exists (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME...
September 11, 2013 at 12:52 pm
maybe slightly over complicated things a bit :ermm:
is it possible to write a query which will 'copy' the cost forward to future months in the following table?
Year.........MonthNo.....Volume.....Cost
2013........1................5000........1
2013........2................4000........NULL
2013........3................5000........1.5
2013........4................2000........NULL
2013........5................5000........NULL
2013........6................3000........NULL
2013........7................7000........NULL
.........
so that it looks...
September 11, 2013 at 8:53 am
the problem is that the email subject should be this...
email 1 subject : stockcode SKU0001 is below safety
email 2 subject : stockcode SKU0002 is below safety
email 3 subject : stockcode...
March 8, 2013 at 8:50 am
brilliant. and the replication is now working perfectly. thanks
February 28, 2013 at 10:06 am
I tried this...
sp_dropserver 'SQL5-SVR'
go
sp_addserver 'SQL-SRV', LOCAL
go
but when i run this...
select @@SERVERNAME
it still gives the wrong name (SQL5-SVR)
???
February 28, 2013 at 9:57 am
if i drop the report entirely and recreate from scratch. It runs the first time then when i try to run again it just hangs?
October 9, 2012 at 8:11 am
thanks for the reply
when i paste in your code everything has lines underneath.
when i go into the script mine looks like this..
' Microsoft SQL Server Integration Services Script Task
' Write...
October 1, 2012 at 2:43 am
thought i'd re-open an old thread instead of starting a new one.
I'm trying to create a pivot...
selectInvYear, VectaGrp1Code, VectaGrp1Name, VectaGrp2Code, VectaGrp2Name, VectaGrp3Code, VectaGrp3Name, StkCode, StkDesc, AccNo, AccName,
[Jan], [Feb], [Mar],...
July 11, 2012 at 1:56 am
thanks for the replies, my scenario is....
i have a list of sales which are allocated to a division (home, export) and area (county for home, continent for export). in some...
July 10, 2012 at 1:44 am
what i now have instead of
if A
@var = select .......
if B
@var = select .......
if C
@var = select .......
i've instead created 3 stored procs so
if A
exec proc1 val1, val2, val3
if B
exec...
April 20, 2012 at 4:18 am
i'm trying something like...
myproc (@operator varchar(7), @value varchar(25))
as
select col1, col2 from tbl1
where col1 @operator @value
is this kind of dynamic deceleration possible??
thanks
April 20, 2012 at 1:36 am
hi
sorry i just abbreviated the joins for simplicity.
the problem with the way your suggesting is that the select statement has many more columns and some other joined table so...
April 19, 2012 at 3:14 pm
thanks for the replies
my first table is a kind of reference table (all_dates_and_products) which i created using a cross join for years, months and joined to products so i end...
April 19, 2012 at 2:54 pm
Viewing 15 posts - 46 through 60 (of 92 total)