Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What type shall I use in SQL Server 2008 for VFP memo fi
Message
From
30/08/2010 11:52:29
 
 
To
30/08/2010 11:44:06
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
01478926
Message ID:
01479217
Views:
38
How many rows of data? Is it too many to step through the vfp contacts table (scan...endscan) and do an insert into sqlserver contacts table ?


>I am trying to get local vfp data stored in kba_data.contacts (dbf) into a new sql2080 database called cmc
>i have tried theupload wizards and they fail
>
>
>Peter
>
>
>
>>>OK i get a connection now
>>>but this :
>>>
>>>
>>>
>>>gnConnHandle = SQLCONNECT("SQL")
>>>
>>>*SQLEXEC(gnConnHandle , [select * from contacts],"cc1")  &&& works
>>>
>>>
>>>
>>>
>>>SQLEXEC(gnConnHandle , [INSERT INTO dbo.contacts (firstname,lastname) SELECT fname,lname FROM kba_data.contacts])
>>>
>>>SQLDISCONNECT(gnConnHandle )
>>>
>>>
>>>does not insert anything
>>>
>>>how would i do that correctly
>>>
>>>
>>>Peter
>>
>>what is the database name that holds contacts that you are inserting into? (Put correct stuff where square brackets are)
>>
>>SQLEXEC(gnConnHandle, "INSERT INTO [databasename].dbo.contacts (firstname, lastname) SELECT firstname, lastname from kba_data.dbo.contacts WHERE [add where condition here]"
>>
>>So if the database you are inserting into is kbb_data and you only wanted to insert records from kba_data that had the firstname of John:
>>
>>
>>SQLEXEC(gnConnHandle, "INSERT INTO kbb_data.dbo.contacts (firstname, lastname) SELECT firstname, lastname from kba_data.dbo.contacts WHERE firstname = 'John' ")
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform