The Wayback Machine - https://web.archive.org/web/20090216122802/http://www.codeproject.com:80/script/Forums/View.aspx?fid=1725
Click here to Skip to main content
5,892,890 members and growing! (18,057 online)
Announcements
* Bold indicates new messages since 2:27 16 Feb '09




BullFrog Power
Advanced Search
Sitemap

General Database


Home > Forums > General Database

 Msgs 1 to 25 of 1,976 (Total in Forum: 38,890) (Refresh)FirstPrevNext
AdminHow to get an answer to your questionadminChris Maunder17:30 10 Nov '05  
For those new to message boards please try to follow a few simple rules when posting your question.
  1. Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
  2. Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
  3. Keep the subject line brief, but descriptive. eg "File Serialization problem"
  4. Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
  5. If you are posting source code with your question, place it inside <pre></pre> tags, or click the "Ignore HTML tags in this message" check box.
  6. Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
  7. Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
  8. Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
  9. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
  10. No advertising or soliciting.
  11. We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.

cheers,
Chris Maunder
CodeProject.com : C++ MVP

QuestionnormalizationmemberHemant Thaker1 hr 16mins ago 
hi

can anybody tell me about the normalization

thanks

Hemant

By:
Hemant Thaker

AnswerRe: normalizationmemberRob Philpott58mins ago 
A normalized database (which is a good idea generally) typically means that the minimum amount of data is stored (no repetition) in a relational manner. Take a look here for more info...

http://en.wikipedia.org/wiki/Database_normalization[^]

Regards,
Rob Philpott.

Questionproblem of champ typememberforyou1 hr 59mins ago 
Hi
I need to put 'abs' for students absent in a review
for exemple of the material which the code is 121 .
I have the following query:

SELECT     id_student, CASE WHEN (CODE) = 1 THEN 'Abs' ELSE [121] END AS m1, 
[122] AS '2', [123] AS '3'
FROM (SELECT id_field, id_student, NOTE, CODE FROM TEST)
p PIVOT (sum(NOTE) FOR id_field IN ([121], [122], [123])) AS pvt
ORDER BY id_student

I have the error here CASE WHEN (CODE) = 1 THEN 'Abs' because [121]is the type float and 'abs' is a text how to solve this?
Thanks!!
QuestionHelp is needed in Triggers and indexes in sql server 2000memberrameez Raja5hrs 27mins ago 
Hi all,

I have to work on Indexes and triggers in sql server 2000 can any body suggest me any article or resourse where i can learn these things.

Thanks in advance

Best regards
Rameez
AnswerRe: Help is needed in Triggers and indexes in sql server 2000mvpMika Wendelius5hrs 11mins ago 
Lots of results in Google: http://www.google.com/search?hl=en&q=sql+server+2000+indexing&meta=&aq=f&oq=[^]

For triggers you could have a look at these:
- http://msdn.microsoft.com/en-us/magazine/cc164047.aspx[^]
- http://msdn.microsoft.com/en-us/magazine/cc164032.aspx[^]

and for indexing for example this:
- http://www.sqlservercentral.com/articles/Indexing/sqlserver2000indexing/1479/[^]

The need to optimize rises from a bad design.My articles[^]

QuestionHow will we stop the duplicating entries while we entering in Excel database?memberhitesh.kalra6hrs 33mins ago 
I insert and update in an excel database but what is the coding to prevent the duplicating entries in the database. Plz tell in c# language. thanx in advance.
Generalhow to create a query by using store procedure in SQL Server 2000 ?memberSovann10hrs 17mins ago 
I have a table of employee attendent like that:

EmpID-----Date----------------Time------------------Status (Field Name)
1-------01/01/2009------01/01/2009 8:00 am--------I
1-------01/01/2009------01/01/2009 12:00 am-------O
1-------01/01/2009------01/01/2009 1:00 pm--------I
1-------01/01/2009------01/01/2009 5:00 pm--------O
2-------01/01/2009------01/01/2009 7:50 am--------I
2-------01/01/2009------01/01/2009 12:00 am-------O

But i want to make a query that take data from table above to be like that:

EmpID-----Date------------In------------Out----------In-------------Out (Fiel Name)
1-------01/01/2009------8:00 am-----12:00 am----1:00 pm------5:00 pm
2-------01/01/2009------7:50 am-----12:00 am----Null----------Null

Can we do that ?
Thank for your kindly to help me...
Best regard,
Sovann

VB.Net

modified on Sunday, February 15, 2009 9:18 PM

GeneralRe: how to create a query by using store procedure in SQL Server 2000 ?memberMaxxx_8hrs 53mins ago 
Something like this should get you close



select c.empid, c.dt as in1,

(select c1.dt from clock as c1 where c1.empid = c.empid and status = 'O'
and not exists (select 1 from clock as c2 where c2.empid = c1.empid and c2.status = 'O' and c2.dt < c1.dt)) as out1,

(select c1.dt from clock as c1 where c1.empid = c.empid and status = 'I'
and c1.dt > c.dt) as in2,



(select c1.dt from clock as c1 where c1.empid = c.empid and status = 'O'
and c1.dt > (select c1.dt from clock as c1 where c1.empid = c.empid and status = 'I'
and c1.dt > c.dt)) as out2

from clock as c
where c.status = 'I'
and not exists (select 1 from clock as c1 where c1.empid = c.empid and c1.status = 'I' and c1.dt < c.dt)


___________________________________________
.\\axxx
(That's an 'M')

GeneralRe: how to create a query by using store procedure in SQL Server 2000 ?memberSovann8hrs 6mins ago 
Thanks for your kindly to help me.
but what you wrote is in query right ?
It did not process.
but if there are more employee, Does it work ?

My idea if we select and use for loop, what can we do ?

VB.Net

GeneralRe: how to create a query by using store procedure in SQL Server 2000 ?memberMaxxx_6hrs 56mins ago 
Sovann wrote:
Thanks for your kindly to help me.


No worries

Sovann wrote:
but what you wrote is in query right ?


Yes - just plain SQL - so you can put it in a stored proc or whatever

Sovann wrote:
It did not process


? in what way. I created a dummy table and entered data similar to your example, ran the query against it and got your desired results.
The column and table names were different to yours, but the query certainly worked fine...

Sovann wrote:
but if there are more employee, Does it work ?


I think it should work as long as there is always an In and Out (not sure what it would do if there was only an In time and no Out - or if there were more than two of each. It doesn't matter how many employees there are.

Sovann wrote:
My idea if we select and use for loop, what can we do ?


If you WANT to write loops etc. then sure, you could do that. You could create a temporary table, populate it using a number of queries in a loop, or whatever you want to do. Depends whether your aim is to solve the problem or to write some sql using a for loop?

___________________________________________
.\\axxx
(That's an 'M')

GeneralRe: how to create a query by using store procedure in SQL Server 2000 ?memberSovann4hrs 42mins ago 
I want to write some sql using for loop. Because i do not know that about number of employee. It will increase when we add new employee info.

VB.Net

GeneralRe: how to create a query by using store procedure in SQL Server 2000 ?mvpMika Wendelius7hrs 18mins ago 
In your example result you have 2 In columns and 2 Out columns. But what happens if a person goes in and out 3 or 4 times a day?

The need to optimize rises from a bad design.My articles[^]

GeneralRe: how to create a query by using store procedure in SQL Server 2000 ?memberSovann4hrs 52mins ago 
if a person goes in and out 3 or 4 time a day, one field will get null...

VB.Net

GeneralRe: how to create a query by using store procedure in SQL Server 2000 ?mvpMika Wendelius4hrs 4mins ago 
Sovann wrote:
if a person goes in and out 3 or 4 time a day, one field will get null...

Don't quite understand. What field?

What I mean is that can a person go in and out undefined number of times during the same day? If he can, do you plan to use dynamic amount of columns (person, in1, out1, in2, out2, in3, out3...). Since this is very hard to achieve using plain sql

The need to optimize rises from a bad design.My articles[^]

GeneralRe: how to create a query by using store procedure in SQL Server 2000 ?memberSovann2hrs 46mins ago 
Oh sorry.
No over that columns bro.
that columns is (EmpID,Date,In1,Out1,In2,Out2) so each employee will have 4 attendants but some day they will absent in afternoon so their attendants will be just only 2 so
in columns In2, Out2 data will null. More is number of employee.

at the first i posted, i want to change data in Employee table like table under it. (hm... maybe is called crosstab.)

VB.Net

QuestionAb Inito conundrums....memberPoisonCreed16:04 14 Feb '09  
Hi

i am stuck in some issues professionally regarding Ab Inito, is there any one who can guide me as to how to go about this Ab Initio things, mates it is really compliv\cated and there is very limited resource available on net regarding Ab Inito......

This is an urgent requirement.......... Sigh
AnswerRe: Ab Inito conundrums....mvpAshfield17hrs 11mins ago 
PoisonCreed wrote:
This is an urgent requirement.


but not urgent enough to contact their support team, which is listed on their website.

Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP

GeneralRe: Ab Inito conundrums....memberPoisonCreed12hrs 39mins ago 
I have already contacted their support team 15 days back , even asking them as to how to go about if i have to purchase the licensed copy of the product. but their answer is inconclusive and way of the track ......

Well what i have gathered so far is that company is very discreet and miser in disclosing any of their trade secrets regarding the product and hardly there is any more information regrading it available on web itself, i hardly found anything substantial so far.....Confused
GeneralRe: Ab Inito conundrums....mvpAshfield4hrs 30mins ago 
PoisonCreed wrote:
that company is very discreet and miser in disclosing any of their trade secrets


I wouldn't expect them to reveal trade secrets, but they should have a decent support dept.

PoisonCreed wrote:
to purchase the licensed copy


That may be the problem, I wouldn't give much support for a free version.

But, I would say, if they don't offer decent support use another product, there are plenty of other tools out there.

Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP

QuestionSQL SERVER 2005 INSTALLATIONmemberMember 46502876:16 14 Feb '09  
Dear Folk,

I am new in SQL Server.I just installed MS SQL Server 2005 in my system(Wista Ultimate) but cant see the query builder or enterprise prise Manager.is there new way installing it to get those two things?



hope your reply,
AnswerRe: SQL SERVER 2005 INSTALLATIONmvpMika Wendelius7:29 14 Feb '09  
Did you install SQL Server Express Edition? If you did, you can download Management Studio separately from http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en[^]

The need to optimize rises from a bad design.My articles[^]

GeneralRe: SQL SERVER 2005 INSTALLATIONmemberMember 46502879:00 14 Feb '09  
thanks
GeneralRe: SQL SERVER 2005 INSTALLATIONmvpMika Wendelius10:12 14 Feb '09  
You're welcome.

The need to optimize rises from a bad design.My articles[^]

Questioncan't find AdventureWorks.dbmlmemberTerRO_GirL2:25 14 Feb '09  
Hello everybody , i've installed the database samples from http://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en[^]
i can find the AdventureWorks_Data.mdf and the .log file , but no .dbml . I am new to all the database stuff , can you help me by telling me where to find it or what to do ?
Thank you !

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Last Updated 9 Aug 2007
Web20 | Advertise | Privacy
Copyright © CodeProject, 1999-2009
All Rights Reserved. Terms of Use