Forum Replies Created

Viewing 15 posts - 46 through 60 (of 92 total)

  • RE: variable product costing

    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...

  • RE: variable product costing

    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...

  • RE: cursor concatenating variable

    that's cracked it. thanks for the help.

  • RE: cursor concatenating variable

    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...

  • RE: replication server name problem

    brilliant. and the replication is now working perfectly. thanks

  • RE: replication server name problem

    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)

    ???

  • RE: ssrs render time

    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?

  • RE: Import file from HTML source

    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...

  • RE: pivot table summary

    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],...

  • RE: is null in IN statement

    thanks kenny

    that worked a treat.

  • RE: is null in IN statement

    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...

  • RE: build sql string into variable

    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...

  • RE: dynamic operator?

    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

  • RE: build sql string into variable

    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...

  • RE: build sql string into variable

    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...

Viewing 15 posts - 46 through 60 (of 92 total)