|
Unless you need to support unicode data in your table(s) the use VARCHAR. Nvarchar is a default and IMHO a complete waste of time if you are using English as your data language. I think the default should be reveresed to use varchar and allow it to fail when a unicode character is inserted. The DB designer should know enough to make an informed decision.
We usually store the folder and filename separate and always use UNC path format for any network drive.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i m new with sql server 2005
i want to set autobackup of database.
how to do this?
Er. Jagwinder Singh
|
|
|
|
|
In SQL Server Managemen Studio, you want to go the Management Menu and Create a new Maintenance Plan. Maybe call it "Nightly Backup". You also want to research the various recovery models for your database; this has an impact on how you may have to backup transaction logs, etc. I've used the "Simple" Recovery model in some small databases and perform a full backup each night. This makes it very easy to recover, however I can't recover to a particular point in time in the middle of the day.
Do some research on Backups, Transaction Logs and Recovery Models before you put a database in production.
Have fun.
|
|
|
|
|
thanks for reply
could you tell me can we set location for backup database
One person's data is another person's program.
--J.Walia
|
|
|
|
|
Hi, please I'need help.
I am populating oracle source in Sql Server Destination. after few rows it fails it displays this error:
[OLE DB Destination [16]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description:
"Invalid date format".
thank you.
|
|
|
|
|
Heres a clue - check for an "invalid date format" in the oracle table, it can also be caused by an empty string in a date field.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi All ,
I have 50,000 entries on my Sql 2005 Table.I would like to know the first time each distinct objects gets in to my table.
Lets say object1 has 10 records on my table at diffrent date ,object2 gas 100 records on the table,object3 has 500 records in the table registered at different date.
I would like to reterive each objects with there first entry only,how would i do it?
Please advice.
THank you all
|
|
|
|
|
Look into rownumber() and partition int TSQL. Combining these to with order by can give you the row numbers of your objects sorted by dates desc and you want rownumber 1 for each object.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have atleast 15 columns but in crystal report the all columns are not legible properly. give me some suggesstions how will I show or print that records. Is there is any option in crystal report of landscape.
thanx in advance
|
|
|
|
|
hitesh.kalra wrote: Is there is any option in crystal report of landscap
Of course there is, have you tried the CR forums, also look into grid/matrix controls for the report.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I am creating a phonebook in c# .net my database is Ms access. There are no duplicates allowed in two columns mobile no and landline no but if I left blank those columns two times it gives an error that "no duplicates are allowed". Please give me such code to allow null but not duplicates are allowed because this is not compulsory every person has mobile or landline.
thanx in advance.
|
|
|
|
|
Open the table in MS Access in the design-view, and set Index to "Yes (No Duplicates)". Set Required to "No" and Allow zero length to "Yes".
That should do the trick
I are troll
|
|
|
|
|
It is not working because Unique required only one null value. So I run the form first time it takes one blank column but when next time I run the form it given an error of the duplicate records.
|
|
|
|
|
hi
in my project i convert excel file in xml and then upload the file in data base . here i use SQL Server 2005. In my excel file consist one record D'Souza when such name comes program throw run time exception as Incorrect syntax near 'Souza
i use following query for insert a record
string istr = "insert into sheet1(Personnel_Area,EE_Grp,Employee_Group,ESgrp,Employee_Subgroup,Cost_ctr,Cos
t_Center,PSubarea,Personnel_Subarea,Peres_no,Personel_Number,Designation,D
esigna,Pos,Age_of_Employee,Birthdate,Complete_name)values('" + Convert.ToString(dataGridView1.Rows[i].Cells[0].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[1].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[2].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[3].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[4].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[5].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[6].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[7].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[8].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[9].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[10].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[11].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[12].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[13].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[14].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[17].Value.ToString()) + "','" + Convert.ToString(dataGridView1.Rows[i].Cells[18].Value.ToString()) + "')";
need a help
|
|
|
|
|
You seem to be quoting your values using single quote (i.e. ') character.
So the ' in D'Souza is taken to be the end of the value.
Have a look at how Transact-SQL deals with quoted strings and the use of single (i.e.') and double (i.e. ") quotes.
Regards
David R
|
|
|
|
|
Hi,
I have a view. i want to get the columns in a view along with its database and servername.
For example, Employee table resides in CSCEmp server's Emp database.
I have a view in CSCDet server that will have a column "EmpName" of [CSCEmp's] Employee table.
When i list view information, i want to display like
view view'sserver Columnname column'sServer
EMPView CSCDet EmpName CSCEmp
Is there a way to do like this.
Thanks.
|
|
|
|
|
Look into the information schema views (under system views in management studio) or sysobjects in 2k. These will give you all the information about SQLs internal structures.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi, as i said. i have a windows form application within the internal organisation users and a web appplication hosted with some hosting company for external users. Both application need to share a common databse? how to share and where to place the databse?
Also is this the same case to share database among different users within the company using windows forms application?
|
|
|
|
|
So you have asked this question 8 times including in the Lounge - I'm bloody sure there were some excellent answers in there, go away and do some work.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
oh its really great to know that some one is hear just to count the questions and for any other --- Else.. I thought i can get some codes without doing any work at all..lol...according to your valuable stupid sugestion i will do my work lol....!If you dont know the answer better dont reply to people..and i am bloody sure that i asked the question only twice, one in C# forum and other in database forum... C# forum people suggested me to ask there lol... read the posts before comment (do your work first )...
|
|
|
|
|
Oops
My apologies - I did not read follow the links to the questions.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm searching for logic which will help me to retrieve table records based on "start index" parameter and parameter which specifies the returned records count. Example:
dbo.Records
num
1
2
3
4
5
SELECT num FROM dbo.Records will return 5 records. I cant find a function or something other which will help me retrieve the following logic
input params : @startIndex = 2 , @recordsCount = 2
so when i perform the select statement to retrieve the 2 records (3 and 4)
If there is no answer with an exact function, is there a wordaraund ?
Please help.
Regards Hris.
|
|
|
|
|
try this ...
select top @recordsCount num from dbo.records where num >= @startIndex
You may also be able to use something like this ...
select num <br />
from dbo.records <br />
where (num >= @startIndex) and (num <= @startIndex + @recordCount)
I haven't tested it, but it is probably close.
|
|
|
|
|
Hii
I am storing images in my sql server 2005 database. Is there any sql query or any other way to get the size of the image stored in my table?
Thanks in Advance
|
|
|
|
|
SELECT DATALENGTH(imagecolumn) FROM sometable
|
|
|
|