Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 insert values for text, and access short date

Author  Topic 

bbxrider
Starting Member

37 Posts

Posted - 2009-08-23 : 19:50:48
and please one other question, the table name has a space imbedded, how does that get coded?
the insert stmt will be in a loop where 000's of recs get added at a time
been trying things like below but nothing working so far
cn.execute "Insert Into 'table name' values (url, dateImported, globalRank, country, countryRank, reach, pageViews, pageViewsPerUser)"

somehow text fields need to be coded like '" & txtUserName & "' when you have string variables?
but numeric variables don't need formatting?
and date fields have some specific way to format for an insert?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-08-23 : 22:43:26
INSERT INTO [Table Name]
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-08-23 : 22:45:57
for datetime date type use 'YYYYMMDD' or 'YYYYMMDD HH:MM:SS'


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -