SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


select where patient has more than 1 provider


select where patient has more than 1 provider

Author
Message
Sean Lange
Sean Lange
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59919 Visits: 17948
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 Modens 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)
Vertigo44
Vertigo44
Right there with Babe
Right there with Babe (714 reputation)Right there with Babe (714 reputation)Right there with Babe (714 reputation)Right there with Babe (714 reputation)Right there with Babe (714 reputation)Right there with Babe (714 reputation)Right there with Babe (714 reputation)Right there with Babe (714 reputation)

Group: General Forum Members
Points: 714 Visits: 840
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.
Sean Lange
Sean Lange
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59919 Visits: 17948
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.

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)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search