Sunday, March 25, 2012
Conversion issues in importing DBF in SQL 2000
I try to import a DBF file into my Microsoft SQL Server 2000 database and I
have some issues with corrupted data. I actually have stored in my DBF
records with different languages, such as German or French, for which I used
some special characters (accents, ?, ..).
When I import my DBF file, I got no error but when I look at the data, the
strange characters have not been converted and I got errors in place of them
.
What can I do to make sure my import respects the integrity of my data?
I was using the standard Microsft DBF driver and I have tested the Advantage
Databaser Server driver as well. Same results unfortunately.
Many thanks for your help.
Regards,
BertFor national characters you need the unicode datatype. Look up 'nchar',
'nvarchar' and 'ntext' in Books Online. Also the use of unicode is well
explained in Books Online.
ML|||Thank you for your note.
Could you please help me once more? It sounds like Books Online is a place
on the web you know about, but this is not my case. Which website could I
consult to know more about the local unicode?
If I understand it right, I need to replace all the characters, is it exact?
Does SQL Server 2000 do not convert these characters automatically?
Thanks.
Bert
"ML" wrote:
> For national characters you need the unicode datatype. Look up 'nchar',
> 'nvarchar' and 'ntext' in Books Online. Also the use of unicode is well
> explained in Books Online.
>
> ML|||Unicode is an universal standard: http://www.unicode.org/
Books Online are available on-line: http://www.msdn.microsoft.com/sql/
and can also be installed locally:
http://www.microsoft.com/downloads/...&DisplayLang=en
To store data as unicode, the data must be created as unicode in the client
application. Look it up in your programming language reference.
ML
Thursday, March 8, 2012
Continuously querying a datastream using SQL Server 2005
datastream using SQL Server. Does anyone have any experience of this? I
have found LINUX based systems such as Borealis and STREAM. I would
prefer to use a Windows based system as the program using the query
results is Windows based.paulb (paulbermingham@.gmail.com) writes:
Quote:
Originally Posted by
I was wondering if it is possible to continuously query a real-time
datastream using SQL Server. Does anyone have any experience of this? I
have found LINUX based systems such as Borealis and STREAM. I would
prefer to use a Windows based system as the program using the query
results is Windows based.
What more exactly what you want to achieve? Query notification is the first
thing that comes to mind, but it may not be exactly what you are looking
for.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Erland,
Query Notifications look like they would do the job alright but it
would mean writing each new piece of data to a table, querying it, and
then pulling the result back into my program. If this is the only
solution then I would probably be better dealing with the data-stream
within the program as speed is a huge factor and recording the data is
a secondary concern. My main question was whether there is specific
functionality within SQL Server to deal with real time analysis of data
streams?
Thanks,
Paul.
Erland Sommarskog wrote:
Quote:
Originally Posted by
paulb (paulbermingham@.gmail.com) writes:
Quote:
Originally Posted by
I was wondering if it is possible to continuously query a real-time
datastream using SQL Server. Does anyone have any experience of this? I
have found LINUX based systems such as Borealis and STREAM. I would
prefer to use a Windows based system as the program using the query
results is Windows based.
>
What more exactly what you want to achieve? Query notification is the first
thing that comes to mind, but it may not be exactly what you are looking
for.
>
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||paulb (paulbermingham@.gmail.com) writes:
Quote:
Originally Posted by
Query Notifications look like they would do the job alright but it
would mean writing each new piece of data to a table, querying it, and
then pulling the result back into my program. If this is the only
solution then I would probably be better dealing with the data-stream
within the program as speed is a huge factor and recording the data is
a secondary concern.
Well, the main purpose of a database engine is to record the data. To me
it sounds like you are looking for a solution without an RDBMS.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Well, I thought SQL Server may have some real time data analysis
capability. Obviously it is not equiped for this. I guess I'll have to
stick to the LINUX based packages I am currently using. Probably faster
anyway.
Thanks,
Paul.
Erland Sommarskog wrote:
Quote:
Originally Posted by
paulb (paulbermingham@.gmail.com) writes:
Quote:
Originally Posted by
Query Notifications look like they would do the job alright but it
would mean writing each new piece of data to a table, querying it, and
then pulling the result back into my program. If this is the only
solution then I would probably be better dealing with the data-stream
within the program as speed is a huge factor and recording the data is
a secondary concern.
>
Well, the main purpose of a database engine is to record the data. To me
it sounds like you are looking for a solution without an RDBMS.
>
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Tuesday, February 14, 2012
Constraint: Table xGUID and Deleted
I have a database table which contains a column with a GUID. In addition I
have column that contains a Deleted flag. I now would like to create a
contraint that makes sure that there is only one undeleted GUID.
What is the expression for this?
Thanks for any advice
Pete
Pete SmithProbably best to maintain this via a insert/update trigger.
create trigger x on tbl for insert, update
as
if exists (select guid from tbl t where guid in (select guid from inserted i
where i.flag <> 'D') and t.flag <> 'D' group by GUID having count(*) > 1)
begin
rollback tran
raiserror ('multiple undeleted', 16, -1)
end
go
"Pete Smith" wrote:
> Hi,
> I have a database table which contains a column with a GUID. In addition I
> have column that contains a Deleted flag. I now would like to create a
> contraint that makes sure that there is only one undeleted GUID.
> What is the expression for this?
> Thanks for any advice
> Pete
> --
> Pete Smith
>
>|||You can do this using an indexed view
create view UndeletedGUIDs
with schemabinding
as
select GUID
from dbo.mytable
where flag<>'d'
create unique clustered index IX_UndeletedGUIDs on UndeletedGUIDs(GUID)