Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error with date field in SQL link server
Message
De
25/06/2010 16:33:53
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01470562
Message ID:
01470619
Vues:
42
>Hi,
>
>We are getting below error while running a query to show the date type data in SQL Server 2008.
>
> Msg 8114, Level 16, State 8, Line 1
> Error converting data type DBTYPE_DBTIMESTAMP to datetime.
>
>Sample Query:
> SELECT code, name, age, dob, doj
> FROM [open_rowset]...[emp_data]
>
> NOTE: dob & doj are date type fields.
>
>
>Thanks In Advance
>Ravi Mehrotra

SQL server doesn't have an understanding of empty dates while VFP has. You can use openquery instead. ie:
Select * from OpenQuery( VFPLINKEDSERVER,
  'SELECT code, name, age, cast(evl(dob, null) as date) as dob, doj FROM emp_data')
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform