[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

SQL Enterprise manager connected to SQLExpress - Conversion failed when converting a char to a uniqueidentifier

Posted on 2011-02-27
3
Medium Priority
?
357 Views
Last Modified: 2012-05-11
Hi..
I registered a SQLExpress DB in SQL 2008 Enterprise manager.
When I run some of the views I get
CONVERSION FAILED WHEN CONVERTING FROM CHARACTER STRING TO UNIQUEIDENTIFIER
Any ideas... The App that uses SQLExpress works fine.
How can I query the views/tables?
thx
0
Comment
Question by:JElster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Expert Comment

by:derekkromm
ID: 34993815
Can you give a little more detail? Like what the data is, the view or query, etc?
0
 
LVL 12

Accepted Solution

by:
Chris M earned 2000 total points
ID: 34994514
It's possible you are getting this error by querying a view, not a table and either the view was not written well and so it's giving you data-type conflicts or it was written well but the data-type of one of the fields in the parent table which the view queries was changed from one type to another.

So it's possible that the view expects character (CHAR, VARCHAR or NVACHAR) data which it converts to data-type uniqueidentifier before displaying it.

To resolve this, run sp_helptext 'schema.view_name' on the view and see which tables it queries then correct the view's text so that it can query the parent tables without any problem.

Once the problem is fixed, you may alter the view to reflect the new one.
Be sure to perform sufficient testing using the data available. Also keep the old and new view syscomments somewhere in a file so that you can roll back to the original view format whenever you want.

Use the snippet attached to see the listing of the different tables and views in your database.

Regards,
Chris
SELECT TABLE_NAME As [Object Name], TABLE_TYPE as [Object Type], TABLE_SCHEMA as [Schema], 
		TABLE_CATALOG As [Database]
FROM information_schema.tables where table_type in ('VIEW', 'BASE TABLE')
order by TABLE_NAME asc

Open in new window

0
 
LVL 1

Author Comment

by:JElster
ID: 34996568
The view is based on a UDF... It's selecting from a UDF.  which I can't open in Enterprise manager.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question