|
Hello,
How can I export/import a complete database using c# and sql server 2000 ?
thanks,
berlus
|
|
|
|
|
Why are you using c# to do a database operation? If you are doing this regularly then use replication or SSIS or BCP, none of which require C#.
You may use C# to initiate the process but it will not do the job for you.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hai,
currently i m using sql server 2000.
i would like to study and get well expertise in STORED PROCEDURES and triggers.
cann anyone provide me the link for the above?
i m a BEGINEER......... help me.......
thanks in advance
|
|
|
|
|
|
|
please tell me
query in sql server 2005 getting 14 days back date from today date.
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
Use DATEADD and supply a negative number.
|
|
|
|
|
I have tended to always do this the lazy way:
select getdate()-14
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
|
|
|
|
|
Bloody hell I've been using TSQL for (way too many years) and never run across that one . Had to actually test it before I believed it worked . Thanks you. Have 5
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yeah - I just sit back with the beer and chips and let the computer do the work for me most of the time
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
|
|
|
|
|
I was searching for Set ParseOnly On support from a managed application. This directive prohibits being used from within a stored procedure.
At the same time, while searching somewhere I referenced about a SQL Parser assembly and a sample codesnippet like vbSQLParser .
I was searching through my system assemblies and also on the Internet but could not make out which assembly or component does this source from? Can someone throw some hint or if it is a download URL from Microsoft or elsewhere, a download URL would be appreciated.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Looks like I am getting it.
Microsoft.SqlServer.Common assembly seems to have a lot of utility towards this objective. Trying to research on it and harness its benefits.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
--> The datatype "Decimal(18,0)"...
--> What is the meaning of the values in the parenthesis..?
J A Nasir K
|
|
|
|
|
|
They got to learn somewhere - I would have thought it was taught at an earlier time than CP
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
decimal decimal(p,s) Where p is a precision value; s is a scale value.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Dears,
I'm using MS SQL Server 2005 and i'm inserting a time value which is ArrivalTime in column and at the end of the trip i insert another time value in another column which is leavingTime
And I want to save the diffrence between the two times in another Column TripTime
so the value in TripTime should be LeavingTime - ArrivalTime
How can this be done.
Thanks
|
|
|
|
|
To get the difference between 2 dates use the DATEDIFF function.
But there's no need to store the TripTime since you've already stored Leaving and Arrival. If you store it you are going to risk the data getting out of sync if there are any changes. Instead, whenever you need to get the tip time, just make a call to DATEDIFF using leaving and arrival times.
|
|
|
|
|
Well, it depends. If you want to be able to search on the trip time - find all trips where the trip time was longer than/shorter than x amount, then you might want to build a computed column and index the table on that computed column, although indexes on computed columns have a set of prerequisite option values which IIRC aren't the defaults, so you have to be a bit careful about setting the options to ensure that the index gets used.
If you can't guarantee the options then perhaps a trigger to compute and store this value would be appropriate.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Delete can be rolled back but Truncate cannot be rolled back.
Begin Transaction
Delete Del_Details
Rollback
and i'm getting my deleted records
but still when i use ....
Begin Transaction
Truncate Table Del_Details
Rollback
This command is also giving me my deleted records..
So where is the difference between Delete and Truncate in respect of Rollback.......Plz explain
|
|
|
|
|
in Sql Server 2000 may be true for other DB's but i have not looked into it, the delete command cheks for data integrety(sp?) and actually removes each record from the tree if there are no FK problems. Truncate basically just moves the pointer from the bottom of the tree to the top and forgets that there was ever any data in there, essientially removes any reference to where that was in memory and starts over. Therefore Rollback cant work beacuse there is nothing to rollback, there is no longer any reference to whatever was in that table. I dont know for sure how they store the data, but using the analogy of a bTree helps when i explain it to people at work. hopefully i explained that right.
|
|
|
|
|
BOL: The DELETE statement removes rows one at a time and records an entry in the transaction log for each deleted row. TRUNCATE TABLE removes the data by deallocating the data pages used to store the table's data, and only the page deallocations are recorded in the transaction log.
If you are in a transaction, it probably does not reuse the pages until COMMIT. Also, truncate can not be run when foreign keys are present.
|
|
|
|
|
You are having trouble with this one aren't you, are you expecting a different response this week!
clickety[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
When you asked this question before (^) several of us gave you the fullest explanation possible. If you don't believe us the try google or something, because no matter how many times you ask the real answer is going to be the same.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi all,
Am trying to upsize certain tables from MSAccess database to SQL database.I have a preexisting database with tables which are vacant in SQL.While i try to upsize the database tables from MSAccess 2003 to SQL server am getting an error.I tried to upsize three tables out of which one was upsized fine with all data imported with out errors(was not having foreign key relations).But the other two are shooting errors and not upsizing .
The error looks like "
"Server Error 3726:"Couldnot drop object 'tablname' because it is referenced by a Foreign key constraint."
I tried to remove all the foreign key connections in SQL tables and still getting the same error.
Since am doing this for the first time,am unsure what exactly is the way to go?
Any help will be welcome.
Many Thanks,
|
|
|
|