Forum Replies Created

Viewing 15 posts - 31 through 45 (of 268 total)

  • RE: Date Question !!!

    Actually,

    DATEADD(WEEK,x,somedate) Just adds 7*x days to the given date...

    Not very useful at all.

    The above functions don't give the correct results.

    Try:

    -- Input Variables

    DECLARE @week INT, @year INT

    SELECT @week = 35, @year...


    You must unlearn what You have learnt

  • RE: Refer to calculated field in expressions?

    You cannot refer to a calculated column like in that way, it is not possible.

    Try either:

    SELECT

     QTY,

     COST,

     TOTAL = QTY * COST,

     NEW_TOTAL = QTY * COST * 1.05

    FROM

     ORDERS

    SELECT

     QTY,

     COST,

     TOTAL,

     NEW_TOTAL = TOTAL * 1.05

    FROM

     (...


    You must unlearn what You have learnt

  • RE: The Bowling Challenge

    "Giving everyone the option to change things not such a good idea from the testing standpoint!"

    I can imagine 😉

    Well I volunteer in any case.

    Sending contact info by normal mail.

    /rockmoose


    You must unlearn what You have learnt

  • RE: Table Relationships

    You are welcome.

    If you use something like this make sure there are no gaps in the data.

    There has to be an entry for every hour of the day otherwise you...


    You must unlearn what You have learnt

  • RE: Sql views vs stored procs

    Ok if were to say something positive about views, it might be this.

    They Do provide an additional "abstraction" layer between the database and the client.

    In this layer security and formatting...


    You must unlearn what You have learnt

  • RE: MYSQL vs SQL 2000

    MSDE i also free. Maybe an alternative.

    /rockmoose


    You must unlearn what You have learnt

  • RE: Table Relationships

    Hi,

    If you can explode a table that contains the hourly rent for every hour and asset,

    then this kind of calculations become more or less trivial.

    /rockmoose

    Provide sample schema, data and sql:

    [cust]...


    You must unlearn what You have learnt

  • RE: Copy and Paste Problem in Enterprise Manager

    SqlServer is a database not a text editor 🙂

    Have you read the manual ( BOL ) ?

    INSERT MyTable(... column ....)

    VALUES(.... 'my long string stuff' ....)

    or

    UPDATE MyTable SET

    ...


    You must unlearn what You have learnt

  • RE: Sql views vs stored procs

    A view is a derived table. ( in relational terms )

    A procedure is some written code of arbirary complexity to perform some task.

    Also procedures can have parameters.

    If you just need...


    You must unlearn what You have learnt

  • RE: Information_Schema Views

    If you want too see the M$ code for these views, they are located in the master database.

    ( just make sure you can see sytem objects )

    /rockmoose


    You must unlearn what You have learnt

  • RE: Loop Help

    How do you format code in this forum !?

    Not a html programmer 😉

    /rockmoose


    You must unlearn what You have learnt

  • RE: Loop Help

    Here is a set based solution.

    Using derived tables and full join.

    /rockmoose

    create table #stories(

    StoryID int not null,

    LineNumber int not null,

    Text varchar(8000),

    primary key(StoryID,LineNumber) )

    insert #stories( StoryId, LineNumber, Text )

    select 33743, 1, 'GRT'

    union...


    You must unlearn what You have learnt

  • RE: The Bowling Challenge

    I guess Andy has been busy with the hurricane !

    /rockmoose


    You must unlearn what You have learnt

  • RE: StoredProcedure With Temptable

    You would have to do:

    create table #freebaltb( ... table definition here ... )

    insert #freebaltb EXEC GET_IVRSCRIPWISEBALANCE 888888888

    /rockmoose


    You must unlearn what You have learnt

  • RE: StoredProcedure With Temptable

    Why do you have to create the #Temp table Structure externally?

    What are You trying to accomplish?

    /rockmoose


    You must unlearn what You have learnt

Viewing 15 posts - 31 through 45 (of 268 total)