Forum Replies Created

Viewing 15 posts - 436 through 450 (of 606 total)

  • RE: T-SQL Output to Text File

    My favourite way is to use osql within a batch file.

    You then call the batch file from a job and write the execution log to another text file.

    I use this...

  • RE: Debugger

    I am probably showing my ignorance here, but how do you get the debugger up in QA. I did not know there was one.

  • RE: help to modify a query

    You need to put the sum function around your case statement, not inside of it.

    E.g

    sum(CASE

    WHEN DIS_DAT BETWEEN '01/05/2003' AND '05/31/2003'

    THEN RET_QTY else 0 end) as UNSOLD_2003,

  • RE: query join, two many-to-many relationships

    A more efficient way would be to use a full outer join. This will return records not matching either side of the middle table.

    SELECT DISTINCT M.id, M.name

    FROM Member M

    FULL...

  • RE: help to modify a query

    See my answe to this post I put in this morning;

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=131367&post=true

    You just need to replace the WHEN statement with between start and end dates.

  • RE: debt collection - select info based on date

    Just had a brainwave and have found how to sum by group OK.

    Use

    select id,

    sum(CASE WHEN datediff(d, pdate,getdate()) 61

    THEN amount else 0 end) as OVER2M

    from product

    group by id

    I was...

  • RE: Inline Query

    You need to name the table and column that you want to count so that sql recognises it. Also, it is quicker to count the primary key than to count...

  • RE: debt collection - select info based on date

    You are going about it the wrong way. You need to use a case statement when generating anything that looks like a pivot table. Checks BOL for examples. For what...

  • RE: Updating a table with warehouse

    A basic overview of olap.

    You need to have analysis services installed. I do not know which cd this comes on I am afraid.

    You set up a db with a central...

  • RE: Mass update of dts package data source uid & password

    Sounds like you've got it covered. Good to hear. I will have to take a look at your solution. Never know when it might come in handy in a new...

  • RE: Complicated Query

    Or like this -

    select t1.id, t1.lastname, t1.firstname,

    case t2.communication

    when 'phone' then t2.value else null end as phone,

    case t2.communication

    when 'email' then t2.value else null end as email

    from table1 t1, table2 t2

    where...

  • RE: Updating a table with warehouse

    If you set up an olap db you can achieve this. When you populate the warehouse you can choose the option to append data only to the fact table.

    However, this...

  • RE: Data Updates

    If you are looking at updating a sql server db from a non sql server db, message queues are required. For example, msqseries. This takes care of changes as they...

  • RE: Right outer join

    I forgot that. I have not worked on oracle for about 18 months and it shows.

  • RE: Right outer join

    A quick and easy way is:

    WHERE CP.CLAIMID =* CD.CLAIMID

    AND CP.CLAIMID =* CT.CLAIMID

Viewing 15 posts - 436 through 450 (of 606 total)