Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

select where patient has more than 1 provider Expand / Collapse
Author
Message
Posted Tuesday, July 9, 2013 8:07 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:22 PM
Points: 13,082, Visits: 12,540
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.


_______________________________________________________________

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 Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1471641
Posted Tuesday, July 9, 2013 8:17 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, October 16, 2014 11:16 AM
Points: 219, Visits: 724
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.
Post #1471645
Posted Tuesday, July 9, 2013 8:38 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:22 PM
Points: 13,082, Visits: 12,540
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 Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1471658
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse