• lisa.ogle (9/5/2013)


    I still cannot get it to work I used this I put the ; after my select statement before your with statement and still get an error.

    We don't see your query. We don't see your error messages. We are good at SQL here. But our psychic abilities are very poor.

    Overall, if you want a tested query, you make yourself a great services if you post:

    1) CREATE TABLE statements for all your tables.

    2) INSERT statments with sample data, enough to illustrate the problem.

    3) The desired result given the sample.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]