Solved

MSSQL guid Data type converting to SQLite

Posted on 2015-01-26
1
210 Views
Last Modified: 2015-02-10
Greetings,

I need to convert an MSSQL db into SQLite.  One of the fields in MSSQL has a data type of 'uniqueidentifer' which is a guid.

When I convert this db into SQLite there is not data type guid.  I need to maintain the references across many tables all of which have guid's as the primary key.

There are 55 tables to deal with.  All relating to each other via the guid's

Any suggestions on how to handle this?  (I am writing the code in C#)

Thanks,
Ron
0
Comment
Question by:RonWensley
1 Comment
 
LVL 24

Accepted Solution

by:
chaau earned 500 total points
ID: 40571973
SQLite does not have many special datatypes. In fact, there are only five datatypes. There is no even a date datatype and there are two different options for storing them. D. Richard Hipp recommends using the ISO standard, and I tend to agree with him, as it is sortable and human readable.

As for your problem - use TEXT (which is a synonym of a VARCHAR/VARCHAR2 datatype in SQLite). You do not even need to specify the size there, but if you insist then use VARCHAR(16)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

862 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

Need Help in Real-Time?

Connect with top rated Experts

30 Experts available now in Live!

Get 1:1 Help Now