Last post Jun 11, 2011 10:17 AM by Mikesdotnetting
Jun 09, 2011 10:49 PM|dow7|LINK
i want to update the database using the new query icon in webmatrix. I have an excel file, how can i add 3 rows from excel using a sql query command into the webmatrix database?
The database columns are same as the columns in excel file. Is it possible to do this?
Jun 10, 2011 08:17 AM|Mikesdotnetting|LINK
The New Query window in WebMatrix is very simple and doesn't support a lot of functionality. All you can do at the moment is type a SQL query into it and click the Execute button to run it. There are no options to add a connection to an Excel file either.
Jun 10, 2011 05:07 PM|dow7|LINK
I can update the database row by using the query below:
INSERT INTO [allfx] ([ID],[Data],[USD],[USEMA12],[USEMA26],[USMACD],[USEMA9],[USMACDH],[USMOMENTUM],) VALUES (N'1',N'6/6/2011',N'97.43',N'98.83',N'98.82',N'0.01',N'0.26',N'-0.25',N'-2.73');
How to add more than one row? if i write :
INSERT INTO [allfx] ([ID],[Data],[USD],[USEMA12],[USEMA26],[USMACD],[USEMA9],[USMACDH],[USMOMENTUM],) VALUES (N'2',N'6/7/2011',N'97.43',N'98.83',N'98.82',N'0.01',N'0.26',N'-0.25',N'-2.73');
it doesn't work. It works only if the database is older than the version created from webmatrix. Is there a new query compatible with the webmatrix db version for adding more than one row into the db?
Jun 10, 2011 06:02 PM|Mikesdotnetting|LINK
SQL Server Compact edition doesn't support batch operations so you can't pass multiple queries to it.
Incidentally - are your data types really ALL nvarchars? I understand from your other questions that you want to perform calculations on them. You should store them as decimals.
Jun 11, 2011 08:34 AM|BrendynA|LINK
We currently don't support the feature you're requesting. You could manually form queries and run them in a query tab as a manual workaround.
We appreciate you sharing the request with us, though. Support for delimited file formats is a compelling feature. We'll consider it for our next release.
Jun 11, 2011 10:17 AM|Mikesdotnetting|LINK
We appreciate you sharing the request with us, though.
Would you also consider adding support for selecting one of a number of valid queries in the query editor, and only excuting the selected one like SSMS?
Never mind. I've added it to Connect :o)