|
|
Hi,
I'm having table like
empid,empname,cityname,statename,countryname.
how to splitt this table structure.
Regards
Bharathi
|
|
|
|
|
Partitioning a table is NOT what you want to do, that is dealing with VERY large tables and requires DBA skills.
You are after a data structure.
You have 3 tables crammed into 1.
Employee
EmployeeID
EmployeeName
StateID
Country
CountryID
CountryName
State
StateID
CountryID
StateName
Employee View
Select *
From Employee E
Inner Join State S on S.StateID = E.StateID
Inner Join Country C on C.CountryID = S.CountryID
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
How to keep one more backup copy of current database.. where i am using only single database to keep my 10000 record of info. if something goes wrong what to do...So i want to keep one more copy of that keeps continues changes info of main database..
************ S G KORE *******************
|
|
|
|
|
No don't keep a copy of the database keep a BACKUP of the database. If you are using 2008 you can get compression with the backup and keep multiple versions. A typical backup regime is something like
backup every night mon-fri
keep the last 5 fri backups
backup end of month regardless of the DOW and keep for 12 months
keep the EOQtr indefinately
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Look into replication (publication) or log shipping. Depending on your usage and resources the type you use may very.
You can replicate to the same SQL server.
|
|
|
|
|
Hello,
I need to write a stored procedure in MySQL that loops through all rows in a table (the column types are TEXT and VARCHAR) and replaces certain characters in the column values with another character. For example, a certain column contains the text "ababa" and I want to change it to "acaca".
I can't quite figure out the part about replacing a character in a string with another and could use some help with this!
Thank you!
Sylv
|
|
|
|
|
Sylv33 wrote: the part about replacing a character in a string
There's a Replace [^]-function in MySQL. You'd have to test if it also works for the TEXT -type field though
I are Troll
|
|
|
|
|
Sylv33 wrote: loops through all rows in a table
The engine should do that; you shouldn't.
|
|
|
|
|
Hello friends,
I restored My database in SQL 2005 of size more than 4 GB but it creates problem when i save picture (image data) in database.i.e i can't save it.So i searched for that problem and came to know that SQL Express 2005 has database size limit of 4 GB.
i upgraded it to SQL EXPRESS 2008 and restored it to there.Still it has the same prblem means i can't able to save data..
So what may be the problem.
Thanks in advance.
RAHUL PATEL.
rahulpatel112@live.in
|
|
|
|
|
AFAIK SQL Server Express 2008 and 2005 have the same set of limitations, one of them being file size is 4GB maximum.
There are a couple of solutions:
- split your database over two or more files;
- don't store big objects (images) inside the database (keep them as individual files, just store the path in the DB);
- switch to a full-blown DB (SQL Server, non-Express).
|
|
|
|
|
Use Sql Express 2008 R2. That has a size limit of 10GB
"An eye for an eye only ends up making the whole world blind"
|
|
|
|
|
I learn something new each day. 10GB is confirmed here[^].
|
|
|
|
|
Thanks for your reply.
i upgraded sql 2005 express to sql 2008 EXPRESS WITH TOOLS that is
R2 version of SQL EXPRESS.
But still the same problem there....
|
|
|
|
|
Then I suggest you provide a detailed and accurate problem description: describe your set-up, show the failing code and the observations or error messages with all their detail. That should allow people to give a precise answer. We need more than "it doesn't work".
|
|
|
|
|
Thanks a lot dear friends for your valuable time.
I have installed SQL EXPRESS 2008 but it was not EXPRESS R2 version thats why its creating problem.
I came to know that thing when i was changing the initial size of database to 5500 MB.
Thankx.
|
|
|
|
|
Please do not cross post in more than one area, you have also posted this in the Q&A's.
Cross posting is bad for splitting up topic responses. I am going to delete the Q&A post as no response there yet.
|
|
|
|
|
I have 10000 rows of schools database. i want to write query such that schools wise ,subject wise ,no_of_students scored < 35 marks. i want to use group by command how do i ???? please help me
************ S G KORE *******************
|
|
|
|
|
|
Cmon be generous, what have you got so far, give us something more that the bare question to work with.
Select School,Subject, count(*) <br />
from suitable tables<br />
where score < 35<br />
group by School,Subject
Suitable tables will be the only challenge
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thank you Mycroft Holmes.
I tried this. but i am getting only one subject grouping data. i want is :-
School name ,count(lan1 marks <35), count(Lan2 marks < 35),count(Lan3 marks <35) ......I want to know school wise No of students who have failed in all subjects. Please tell me
************ S G KORE *******************
|
|
|
|
|
shiva.kore wrote: lan1 marks
What does this represent in your ideas.
Do you want a count of all students who scored < 35 in EVERY subject. This is quite a bit more complex and requires more knowledge of your data.
Basically get a distinct list of all student/scores > 35 then get a list of all student/scores who are NOT IN the > 35 list.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
We did a program 5 years ago to read a dbf table. The user now updated to Windows 7 and the program now gets this error
err=-2147467259 (80004005) [Microsoft][ODBC Driver Manager] Driver does not support this function
Connection string=Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=E:\\SPEC.DBF;Exclusive=No
It does NOT fail on the development machine which has Visual Studio 6, and Vis Studio 2005 .Net and Vis Studio 2010 are installed.
It did fail on a new Win 7 virtual machine after install the Visual Fox Pro 9 Driver (prior to the VFP driver it was getting a 429 activex failure).
It is not clear what the correct driver is to resolve this.
Can anyone help?
|
|
|
|
|
So you need to work out if it is win 7 or the virtual machine. I seem to have heard a number of complaints about drivers and virtual environments.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I think if you install MDAC_TYP 2.8 or earlier may solve your issue.
|
|
|
|