|
The keyword you're looking for is UNPIVOT .
What database are you using?
|
|
|
|
|
What a classic, this is the most basic of error in database design and now you have to deal with the issue.
Is the change in structure going to be a permanent change to the data structure or is it just to facilitate some reporting requirement?
I would go with the view solution if it is for reporting. A series (16 of them) of UNION queries would do the job but t would be ugly.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
This will be used only for reporting purposes.
|
|
|
|
|
Then go with the view idea
SELECT commonfields,
Ing1Name AS fieldanme,
Ing1Size,
Ing1PRM,
Ing1AcceptedUnderTol,
Ing1SPCSample,
Ing1TargetWgt,
Ing1ActualWgt,
Ing1PartialActualWgt,
Ing1PreactWgt,
Ing1SlowFeedTime,
Ing1FastFeedTime
FROM SomTable
UNION ALL
SELECT commonfields,
Ing2Name,
Ing2Size,
Ing2PRM,
Ing2AcceptedUnderTol,
Ing2SPCSample,
Ing2TargetWgt,
Ing2ActualWgt,
Ing2PartialActualWgt,
Ing2PreactWgt,
Ing2SlowFeedTime,
Ing2FastFeedTime
FROM SomTable
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I want to build a small bank application using sql oracle server
as back end and c# as the front end for my practice.
|
|
|
|
|
Okay. Put together the requirements, and start planning it out. This is how you start any project. People are not going to just drop what they are doing and give you code to any kind of application.
""Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
What sort of banking application? HR? Trading? M&A? Retail?
Why don't you start by reading some books on programming before you decide you want to create something as complex as a 'banking' application?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
I'm sorry I only do big banks. Can't help you out.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Chris Meech wrote: I'm sorry I only rob banks. Can't help you out. FTFY
thatrajaNobody remains a virgin, Life screws everyone
|
|
|
|
|
|
+5 for you! I've run across this site many years ago, and it's nice to see that it is still around
""Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Really that's a nice site. Last 2 years I have used that site for 100s of questions in CP. BTW thanks.
thatrajaNobody remains a virgin, Life screws everyone
|
|
|
|
|
Ok.. you first have to plan out the features you wanna put in your application and then will fix the database structure and start coding modularized way.
Rest you can seek assistance any time here at Code Project for any type of stuck outs.
- Happy Coding -
Vishal Vashishta
|
|
|
|
|
Member 9071414 wrote:
I want to build a small bank application using sql
oracle server as back end and c# as the front end for my practice.
Depending exactly on what those terms mean then I wouldn't suggest that you do this yourself.
The primary requirement for something that manages money is it needs to be secure. Secondary to that is fulfilling the business needs of the company.
Normally some experience is necessary to correctly fulfill the first requirement. Failing to fulfill the first requirement could and probably will lead to monetary losses.
|
|
|
|
|
Hi everyone! I have two roles. I need to make members in one role be able to view members in another role. I'm stuck and don't know what to do now. Please help.
|
|
|
|
|
Are you using the ASP membership provider or something else ?
What type of information do these members need to see about each other ?
|
|
|
|
|
For this you can make Role 1 as Admin or Priorty Role.. which has command over Role 2.
- Happy Coding -
Vishal Vashishta
|
|
|
|
|
Hello,
WE are moving to a 64 bit machine. The usual provider MSDAORA is not avaliable. Started to use the ORAOLEDB.ORacle provider. While this works, there is a data issue. One of them show up as data conversion to type numeric. This worked perfectly on the 32bit environment.
Which is the ideal provider to use on a 64 bit machine?
Much appreciated!!
|
|
|
|
|
I suspect you don't have many choices.
As you stated Microsoft doesn't do a 64 bit version.
And presumably you have spent the time to verify the actual problem in the Oracle version.
At one time there was a 3rd party company that created database drivers. But searching quickly I can't find them. You might have better luck.
Other than that I would suggest modifying your code. You can always have your SQL return a string, rather than numeric, and then process that in your C# code.
|
|
|
|
|
A bit of an issue.
The select statement has about 450 variables(?), I know, not something I created.
The select statement is not executing stating it is exceeding the 8000 characters selection limit.
This is the first time I am ecountering a limit on selection.
|
|
|
|
|
vanikanc wrote: The select statement is not executing stating it is exceeding the 8000 characters selection limit.
I can assure that a statement limit has existed for years. Pretty sure I saw it in Oracle 8.
So in terms of a previous driver you got lucky because you were at the border anyways. And depending on the data it could have gone over with the older driver.
The only solution for that, which I can think of (besides getting rid of all those fields) is to encode the data into xml and then return is as a blob and then re-extract.
|
|
|
|
|
I have to update several records and each record has a unique update. I'm very new to sql so any suggestions would be appreciated.
|
|
|
|
|
LucyDunn wrote: I'm very new to sql so any suggestions would be appreciated.
Here's[^] the manual. Good luck.
Bastard Programmer from Hell
|
|
|
|
|
The thing to look for is called "transaction".
|
|
|
|
|
i need mammogram database (MIAS DB), anyone can help me? thanks
|
|
|
|