• Vertigo44 (7/9/2013)


    Sean Lange (7/9/2013)


    Vertigo44 (7/9/2013)


    Ok I have finally had time to circle back around to this query. In my attempts to follow the Forum Etiquette thread I ran into a slight problem in that my unique ID column is not of type INT. My unique id column is an Event_ID. I am getting an error saying that

    "Table '#vEvent' does not have the identity property. Cannot perform SET operation." and if I try and skip the SET operation I get this error.

    "Conversion failed when converting from a character string to uniqueidentifier." Thank you!

    So basically you came back with a table and no data? And none of the data looks even remotely like your original post? I would be willing to help you but you have to provide enough information to allow us to help.

    ?? My data is in my previous post. I need help getting the data into that temp table like Jeff's thread describes. Jeffs thread uses an ID column of type int. That is not the case with my data. So if I were able to get my data into that one table I could then do it for the other table and post the code to create both temp tables and fill both temp tables with the data you need to see what i need.

    Your #vEvent inserts have invalid data. Some of your GUIDs are invalid. Please go back to your original post and turn all of that into something that is readily consumable.

    1. Sample DDL in the form of CREATE TABLE statements

    2. Sample data in the form of INSERT INTO statements

    3. Expected results based on the sample data

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/