Solved

MSSQL guid Data type converting to SQLite

Posted on 2015-01-26
1
214 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Dependencies in Software Design In software development, the idea of dependencies (http://en.wikipedia.org/wiki/Coupling_%28computer_programming%29) is an issue of some importance. This article seeks to explain what dependencies are and where they …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

813 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

17 Experts available now in Live!

Get 1:1 Help Now