Friends i am going to develop a website which is like you tube.so i want to play an add first then i want to play the video on clicking the video file.so help me in writing the code. i wish to use two databases one for adds and other for videos.so please help me writing code
Please do not post questions asking people to write your code for you. Members of this site come here to help people who make an effort to learn and do their own work. If you do not know how to begin to create your project then find some online study guides, or buy some books.
From the Oracle language reference: The (+) operator can be applied only to a column, not to an arbitrary expression. However, an arbitrary expression can contain one or more columns marked with the (+) operator.
So the second syntax looks valid to me. Does it give you the expected results?
"The ones who care enough to do it right care too much to compromise."
By the way, 50 km is about half a degree. Depending on the amount of rows in your table, it might be wise to filter for longitude between -122.5 and -121.5 and latitude between 36.5 and 37.5 first.
Also a simple transformation with 110 km/degree for latitude, and 110 * cos(latitude) for longitude, and then using simple pythagoras might speed up the query.
To add to Jorgen's answer, I've always wondered why SQL Server doesn't allow us to use alias in WHERE and HAVING clauses. The answer to that lies in the logical order in which the query is processed. The WHERE and HAVING clauses are processed before the SELECT clause and the alias do not exist at that stage.
However, technically it should be possible to introduce another stage earlier in the query processing pipeline where a mapping between expressions and their alias is made and WHERE and HAVING clauses can look up to these mappings and substitute the actual expression in place of the alias.
Ado.net is the Library in .net technology. this library help to you for connect your application to the database.
- Now Come in depth
C# is a language. and responsible to create the User Interface like Console, Web, and Window Application.
SQL is also language for create the database and database store the data.
Suppose i need to connect my Front-End to the Back-End.
or We say that C# Communicate to the SQL. now its not possible to two different language communicate to each other. Simple Example is
One Person is Russian and second is Indian now they want to talk to each other. Big Problem Occur when they want to communicate because Russian not known the Hindi language and similar Indian not know the Russian Language. now both person need to mediator or Converter. Converter convert the language means for Indian to Hindi and Russian to Russian Language.
-----Ado.Net Mediator between the Front-End to the Back-End-----
Ado.Net is provider to make the connection between the Front-End to the Back-End.
Student of Dr. Sandeep Karan CAC Noida
If there's no records left, there's little to reindex.
What is the difference between truncating and deleting a table?
Google "MSDN Truncate", and from the manual we learn;
Removes all rows from a table without logging the individual row deletions. TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause; however, TRUNCATE TABLE is faster and uses fewer system and transaction log resources.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
So if we are using the Delete statement with the WHERE clause is it necessary to reindex? Is there a "standard" for when to reindex files?
After further research we will be using the delete clause because we want to retain a given number of days data. Within that given number of days data we will also be deleting specific rows based on a given parameter. We just want to make sure we are covering all bases.
1. Deletion is very faster. Almost no (very minimal) transaction log is produced during this operation.
2. Data pages which are used by the table are de allocated for further use by SQL Server in other operations.
3. Identity column value is reset from its original default position. For example if a table has an identity column and identity value start form 1 then after running truncate command the value start incrementing back from 1.
4. As wiping out rows are very faster, so the number of locks are low. Although during TRUNCATE operation table and page lock happens but not each row.
5. TRUNCATE TABLE command does not support where clause, it also does not works if foreign key exists in the table. In addition, table participates in log shipping or replication also does not honor TRUNCATE table command.
6. Records removed by the TRUNCATE COMMAND cannot be restored even though the database recovery model is set to FULL.
7. TRUNCATE statement also does not fire triggers. DELETE Statement:
1. The DELETE statement removes rows one at a time. For each deleted row the operation writes an entry in the transaction log.
2. DELETE operation is more resource intensive thus consumes more database resources and locks.
3. Where clause can be included with the statement to restrict the number of affected rows.
4. Internally the DELETE operation does not cleanup rows immediately if the table has any index on it, The operation marks the affected rows "to be deleted". The marked records are known as GHOST RECORDS. Although these records are de allocated quickly by a background cleanup process for better performance.
-- DELETE, TRUNCATE and DROP Statements
The DELETE command is used to remove rows from a table.
A WHERE clause can be used to only remove some rows.
If no WHERE condition is specified, all rows will be removed.
After performing a DELETE operation you need to COMMIT or ROLLBACK the transaction to make the change permanent or to undo it.
Note that this operation will cause all DELETE triggers on the table to fire.
TRUNCATE removes all rows from a table.
The operation cannot be rolled back and no triggers will be fired.
As such, TRUCATE is faster and doesn't use as much undo space as a DELETE.
The DROP command removes a table from the database.
All the tables' rows, indexes and privileges will also be removed.
No DML triggers will be fired. The operation cannot be rolled back.
--Difference between TRUNCATE and DELETE commands
1) TRUNCATE is a DDL command whereas DELETE is a DML command.
2) TRUNCATE is much faster than DELETE.
Reason:When you type DELETE.all the data get copied into the Rollback Tablespace first.then delete operation get performed.Thatswhy when you type ROLLBACK after deleting a table ,you can get back the data(The system get it for you from the Rollback Tablespace).All this process take time.But when you type TRUNCATE,it removes data directly without copying it into the Rollback Tablespace.
Thatswhy TRUNCATE is faster.Once you Truncate you cann't get back the data.
3) You cann't rollback in TRUNCATE but in DELETE you can rollback.
TRUNCATE removes the record permanently.
4) In case of TRUNCATE ,Trigger doesn't get fired.
But in DML commands like DELETE .Trigger get fired.
5) You cann't use conditions(WHERE clause) in TRUNCATE.
But in DELETE you can write conditions using WHERE clause
INSERTINTO Person VALUES
SET Gender = CASE Gender WHEN'M'THEN'F'ELSE'M'ENDSELECT *
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
We're currently implementing a warehouse management system with some customizations. One task is to plan the work in the warehouse by releasing waves of picking activities. The release is handled by a stored procedure. This stored procedure generates data on the amount of work that needs to be done, number of containers that are required, etc.. The planner needs to know this information in order to release the appropriate waves.
So, in order to capture the required data, we have another stored procedure which releases all waves that are not yet released and rolls back the transaction once it's done. This roll-back is a guarantee. The problem is that during this 'simulation' other queries are blocked, which creates a performance problem.
Is there a way to run the 'simulation' without blocking all other queries?
I imported data into a Ms Access 2013 from SQL and all the data is there. I created a Query and also created a report that will use the Query. So the Query returns all the data. There are around 590 000 records that needs to be displayed by the record and records that are returned by the Query. when i do a Print Preview it gives me
Page 32767 of 12224
So i am afraid to start printing because from this look it seems like it does not show all data, but my assumption is that Print Preview cant show all the data , even if i try to go to the last page, can anyone clear my assumption.
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
There are around 590 000 records...So i am afraid to start printing
You should be.
Why exactly do you think that you should print something that is probably going to be about 6000 pages (at 100 records per page).
Who has told you that they are going to read this? Have you suggested to them what 6000 pages represents? Perhaps if you put a box (10 x 500 packages) on their desk and ask them what they planned to do with that then you might start a conversation that would lead to reports that are actually useful.
Other than that I certainly wouldn't attempt to print that at one go. If it messes up in the middle you have to start the entire job over. So select 400 pages at a time and print.
Might tell them you need your own printer too as it is going to tie it up for quite a while.
Last Visit: 31-Dec-99 18:00 Last Update: 28-Aug-15 20:05