Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MSSQL guid Data type converting to SQLite

Posted on 2015-01-26
1
Medium Priority
?
287 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
[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
1 Comment
 
LVL 25

Accepted Solution

by:
chaau earned 1500 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

660 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