|
Jack_18 wrote: I have a large quantity of data that I want to write to the databaseas fast as possible.
A database isn't optimized for bulk logging in realtime. If "as fast as possible" takes five seconds, would that be considered acceptable?
Jack_18 wrote: I thought of dividing the data into ,say, 5 parts and use 5 threads to put these 5 partsso that my work is completed in 1/5th time.
Adding a thread doesn't mean that your work is done in half the time. How many threads can your system run simultaneously?
If you need to log a lot of data, consider dumping it as suggested and have a second proces write it to a database.
I are Troll
|
|
|
|
|
Have a Google on '.net embedded database'.
The first link offered has several suggestions and the fifth (judging purely from the subject line) might fit your needs.
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
Hi Henry,
not sure referring to Google results by their position on the screen works well for different countries. By default, in Belgium we get a localized Google site for starters; then there may be payed results on top; and of course, items move around when they become more/less popular.
This is what I am currently getting for your suggested Google action (using www.google.com, not .be):
Raima Embedded Databases
eXtremeDB Embedded DBMS
Embedded Database
We need an Embedded Database for .NET applications - Jon Galloway
SQLite - ALMOST a great embedded database solution for .NET ...
Embedded SQL database engine for .NET developers - VistaDB
Embedded .Net database shootout
DotNetFirebird: Using Firebird SQL in .NET: Embedded Firebird and
...
do you see the same list?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Luc Pattyn wrote: not sure referring to Google results by their position on the screen works well for different countries
Er........
I should have known that.
As far as the list goes mine (google.co.uk) starts with the 4th item in your list and then follows exactly. The first two do not appear on the first page but the 3rd is.
Still, if the OP did search he should have got some ideas at the very least.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
yep, Google is American, and very NTSC at that, Never The Same Content. As is most of the internet.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
i Have Self join Table in Sql server Database(accounting database)
this is table columns(Accounts Table)
AccountID
ParentAccountID
AccountNo
AccountName
and i have another table (Accounts Balance Table)
AccountBalanceID
AccountID
FirstBalanceCredit
FirstBalanceDebit
TotalCredit
TotalDebit
in accountbalance i add balance for accounts in last level which is not parent for any other accounts
so my question is how to get sum of debit or credit in any level
for example if i have accountx which is parent so it doesn't have any rows in accountbalance because it's not last level i need to get total debit for that account which is the total accounts for all accounts under him which may not be the last level thanks for any help
md_refay
|
|
|
|
|
with Account(AccountID)
As
(
select AccountID from Accounts A where AccountID = #AcountNumber#
union all
select A.AccountID from Accounts A, Account B
where A.ParentAccountID = B.AccountID
)
SELECT sum(totaldebit) TotalDebit FROM Account, AccountsBalance where
Account.AccountID = AccountsBalance.AccountID
replace #AcountNumber# with your account number (probably use variable/parameter).
Hope this will help you
|
|
|
|
|
In the stored procedure,
I have a UDT table which have one column.
and also a UDF(multi valued) that returns five columns , this UDF have one parameter of string type
How can i call that UDF(multi valued) in the select statement ?
like following mentioned.
Select from tablename T
Inner Join UDF(column) F on F.id = T.ID
The ID is common column in both tables and also i want to create join between them
|
|
|
|
|
Hi,
My requirement is, i have to update a column with replace funtionality
eg., column1
-------
this is columnA
columnA is here
after update,
column1
-------
this is columnB
columnB is here
i have to update only A with B...
Any idea or code samples will be very much appreciated.
|
|
|
|
|
I think I may have misunderstood (esp. due to reference to ColumnB), but replace will do it:
SQL> select C from dave;
C
--------------------------------------------------------------------------------
this is columnA
columnA is here
SQL> update dave set c = replace(C, 'columnA', 'NewText');
2 rows updated.
SQL> select C from dave;
C
--------------------------------------------------------------------------------
this is NewText
NewText is here
SQL>
Dave
----
Data Exploration and Data Profiling Tools[^]
|
|
|
|
|
padmanabhan N wrote: i have to update only A with B...
If that`s the case then simply update columnA with columnB
eg:
update mytable set mytable.columnA=mytable.columnB where .....
When you fail to plan, you are planning to fail.
|
|
|
|
|
I have a simple problem with a not-so-simple query (for me) to write.
I have table A with has a single related table B.
The relationship between A and B is a 1 : many
I need a query the selects all rows in A that have nothing in B. I tried doing a query using Count(1) from B but I just cannot figure out the correct syntax to get a working query.
Appreciate it if the SQL Gurus can help.
Thanks
|
|
|
|
|
Not sure exactly what you're trying to do but perhaps something of this form could help?
SELECT * FROM A WHERE NOT EXISTS (SELECT * FROM B WHERE A.x=B.y)
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Your query did the job. Thank you.
As to "what I'm trying to do" I have one customer group creating the entries in table A.
I have a second ops group out on the floor that creates the entries in table B.
The second group needs to know all setups that have not been setup on the floor. Thus the query.
|
|
|
|
|
Glad it worked. I've done similar queries to find out where data, etc. is missing.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
See this[^] thread from yesterday.
|
|
|
|
|
|
Hi,
I'm using SQL Server 2005.
I have the following SQL which is supposed to pad an integer value with leading zeros. The problem is that it prints 0 instead of 001
DECLARE @UserID INT
SET @UserID = 1
DECLARE @UtopiaOrderNumber NVARCHAR
SET @UtopiaOrderNumber = (SELECT RIGHT(REPLICATE('0', 3) + CONVERT(NVARCHAR(3), @UserID), 3))
PRINT @UtopiaOrderNumber -- prints 0 instead of 001
The following SQL does select the correct value:
DECLARE @UserID INT
SET @UserID = 1
SELECT RIGHT(REPLICATE('0', 3) + CONVERT(NVARCHAR(3), @UserID), 3) -- selects 001 as expected
Can anyone let me know what I'm doing wrong?
Thanks,
dlarkin77
|
|
|
|
|
You used a default for NVARCHAR the command should be
DECLARE @UtopiaOrderNumber NVARCHAR(3)
That will give you the output you expect.
|
|
|
|
|
That sorted it out alright. Thanks very much.
|
|
|
|
|
Hi all
I'm experiencing troubles with the code from this site.
Which parameter is exspected instead of:"master..sysdatabases" in the following sql-command:Dim mySQL As String = _
"IF EXISTS (" & _
"SELECT * " & _
"FROM master..sysdatabases " & _
"WHERE Name = 'MyDatabase')" & vbCrLf & _
"DROP DATABASE MyDatabase " & vbCrLf & _
"CREATE DATABASE MyDatabase "
Thanks,
Lucchingolo
|
|
|
|
|
What database engine are you using?
|
|
|
|
|
I'm using Microsoft SQL Server 2008
|
|
|
|
|
Okay, by right clicking on a database in SSMS you can select "Script Database as" then select "DROP to" you can then find that you are looking for sys.databases
As this looks like .NET code you may not have access to SSMS so here is an T-SQL example:
IF EXISTS (SELECT name FROM sys.databases WHERE name = N'MyDatabase')
DROP DATABASE [MyDatabase]
|
|
|
|
|
Sorry, still get an error.
Maybe i misundertood you.
Fact is that i still get an error.
What i did is using your sql-command as string for my SQL-command.
What I mean is this:
In the Form1_Load-Event of my Application(project).
MyConnection = "Server=localhost;" & "DataBase=;" & "Integrated Security=SSPI"
'Your line of code
Dim mySQL As String = "IF EXISTS (SELECT name FROM sys.databases WHERE name = N'MyDatabase')DROP DATABASE [MyDatabase]"
Try
Dim conn As New SqlConnection(MyConnection)
Dim myCmd As New SqlCommand(mySQL, conn)
conn.Open()
myCmd.ExecuteNonQuery()
conn.Close()
.
.
.
Last but not least, don't forget that the point is not only to "drop" a Database but i'm trying so hard to create a SQL-Database.
thank you,
Lucchingolo
|
|
|
|