|
hi friends
what is normailzation?
type of the normalization in sqlserver2000
regards
saravanan
|
|
|
|
|
Normalization is the process by where you take a set of columns and find out which should be grouped together to form tables. That's my definition...google would probably do a better job of it though
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
My dear friends,
I’m battling with a major issue in T-SQL. I want to specify the format of a DateTime variable. In VB there is a command called ‘DateSerial’ that you can use to specify each value (Day, Month and Year) of the Date variable, but there is no such function in T-SQL.
I live in South-Africa, and the date here is in the following order: Day, Month, Year. If I set a DateTime variable in this order - (SET @Date = ‘14/2/2007’ ) - the following error occurs: ‘The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.’ How can I solve this problem?
Thanks, Werries
A programmer's life is good... or is it?? Ek dink nie so nie!
|
|
|
|
|
Hi there,
Thanks for those who had a look at my problem, but I've solved it. Just one simple sample on a previous post on this forum gaved me the answer.
DECLARE @QAZ AS DATETIME<br />
SET DATEFORMAT dmy;SET @QAZ = '14-02-2007'<br />
print @QAZ
Result: Feb 14 2007 12:00AM
A programmer's life is good... or is it?? Ek dink nie so nie!
|
|
|
|
|
I strongly recommend you use the ISO date format yyyyMMdd , interpretation of which is not subject to the locale or language settings of your SQL Server installation or the connection.
So I would use SET @Date = '20070214' .
|
|
|
|
|
I am some what new at this, but I need some help connecting a sql database to my asp.net app, and I keep getting security errors. Now, I've connected to databases before, but that was in a class where our instructor created all of our dbs since it wasn't a database class. I've created the table using SQL Server Express 2005 and I am trying to connect it to a website I have built in Visual Studio 2005. What am I doing wrong?
|
|
|
|
|
check your connection string
and make sure that u write the server name and database name correct
|
|
|
|
|
I'm not even getting that far. When I go to set up the settings to my sql connection I get an error saying that SQL server doesn't allow remote connections. Do I need to create a user in the security settings in the database and then use that account for authentication? I'm use to doing this in mysql and php, but not to sure with the setup with the Microsoft products.
|
|
|
|
|
You need to run the Configuration Manager and set everything there...
|
|
|
|
|
Check this link[^]
it might help
rAm
i Think, i Wait, i Fast -- Siddartha
|
|
|
|
|
What's wrong with these code: i wanna set all the values in Field19 are 'abc'
CDaoDatabase db;
CDaoTableDef tableDef(&db);
db.Open("C:\\ktt.mdb");
tableDef.Open("Table3");
CDaoRecordset recset( &db );
tableDef.CreateField("Field19",dbText,255,dbUpdatableField | dbVariableField);
if ( !recset.IsEOF() )
recset.MoveLast();
while( !recset.IsEOF() )
{
recset.SetFieldValue("Field19","abc");
recset.MovePrev();
}
|
|
|
|
|
Hi All,
I am an app in VS C++ 2005 that uses an SQL Server 2005 database.
I am having trouble understanding how to enter a date into the database.
The field data type is: smalldatetime .
The date and time has been assigned to a string and would have a value like '30/05/2007 5:30PM '
When I write the query like: INSERT INTO MyTable(Date) VALUES(MySTRING)
I end up with an error and assume it's to do with the way O have formatted the string - am I on the right track ?
Fritzables.
|
|
|
|
|
Hi Fritzables,
It is very difficult to say on which track you are, without knowing the error message. But I expect the problem is the date format. You can try two things:
SET DATEFROMAT DMY
Or you can format the string to:
'2007-05-20 5:30PM'
I hope this helps.
Wout Louwers
|
|
|
|
|
G'Day Wout,
If I was to enter the sting at: 30/05/2007 5:30PM then the error message goes something like: syntax error near 5.
Ok, so if I was to use the SET DATEFORMAT DMY , at what point would I define this - sorry for the stupid question.
Regards
Fritzables.
|
|
|
|
|
Ah, the errormessage explains something. You should try:
INSERT INTO MyTable(Date) VALUES('30/5/2007 5:30PM')
I think you forgot the quotation marks.
If that does not work you can try:
SET DATEFORMAT dmy;INSERT INTO MyTable(Date) VALUES('30/5/2007 5:30PM')
Wout Louwers
|
|
|
|
|
Wout - you're an absolute legend !!!
Yea, it was the missing quotes that put all things back in order.
Thanks a million.
Fritzables.
|
|
|
|
|
Hi,
I want to develop an application for pocket pc and desktop with VB.NET. For this application I want to use only one database. This will be sql server 2005 and not sql server 2005 CE. I really don’t know how to do this. I have search the internet on this subject, but found nothing, except RDA which is using sql server 2005 CE.
I will appreciate any suggestion/tips from you on this subject.
GR,
|
|
|
|
|
Hi i have one employee month record in my table...,
My table look like:
Id , SDate , M1 , M2
100 4/1/2007 78 45
100 4/2/2007 89 65
.
.
.
100 4/30/2007 87 67
Like this my table is there...,
Now i want to show sunday records separately and other weekdays records separately...,
Plz help me...,
Magi
|
|
|
|
|
You can use DATEPART to filter by day of the week.
|
|
|
|
|
True as far as it goes. However, the problem with applying any function to the data in the table is that the query optimiser cannot use an index on that column, if there is one. If this is the only column in the WHERE clause, or the only column in the GROUP BY or ORDER BY clauses, the query optimiser may have to resort to a table scan, i.e. reading all the rows in the table from beginning to end (it will instead show as a Clustered Index Scan in the query plan if there's a clustered index on the table).
If having an index on this information would be helpful, consider adding an extra column which contains the weekday data, and indexing that.
Be aware that the first day of the week is different in different locales and the return value of DATEPART is therefore affected by the connection settings - you should check the value of @@DATEFIRST in any calculations. For that reason I believe the DATEPART function is considered non-deterministic and it may not be possible to add a computed column and index that - it may need to be a real column. You could use a trigger to update it as required.
|
|
|
|
|
hi friends
how to delete two tables using single delete query in sqlserver2000
regards
saravanan
|
|
|
|
|
saravanan05 wrote: how to delete two tables using single delete query in sqlserver2000
Why do you want to use a single delete query? What is wrong with two delete statements inside a transaction?
|
|
|
|
|
Hi
You can drop more than 1 table but you can delete two tables
drop t1,t2 (two tables will be dropped from database)
but it is not possible to delete records as in delete from t1,t2
Which one you are asking ??
Harini
|
|
|
|
|
Hi Friends
I have table containing prd_id,version_no
Now I want to get product,and their latest version_no
how go about
kindly help me
regards
chandru
|
|
|
|
|
dear chandru,
i cannot understand ur question fully.if the version is an integer number u can draw the maximum value using max() function.can u pls describe ur question in detail
shally
|
|
|
|