On Jul 18, 4:57*am, "Tony Johansson" <johansson.anders...@telia.com>
wrote:
> It's a webbsite using C# and ado.net to access a oracle database.
> Below is just the beginning of the sql select statement that is used and
> here you
> can see form_slag and I wonder
> how this is possible. This form_slag looks like a variable.
> If I look at this sql select statement just before dataadapter.fill is
> executed I see this form_slag just as it is in the select statement below..
> What seems very strange to me is where is the actual value for this
> form_slag *is given.
> This form_slag must have a value before the dataadapter.fill is executed but
> it has not or it must be fetched from the database in some way that I don't
> understand.
>
> Note as I wrote earlier this is just the beginning of a large sql statement.
>
> I have two questions.
> 1.Can anybody explain how this form_slag can be used in the way that it is
> used ?
>
> 2. What does it mean when we have this in the select statement '2'; as
> send_ro_roles ?
>
> select distinct form_nr,
> '2;' as send_ro_roles,
> '2;' || k.kli_klia as roles_and persons,
> k.klia_namn as klient_ansvarig,
> (
> select distinct bizref_check_freq
> from bizrulereference
> where bizref_date =
> (
> * *select MAX(bizref_date)
> * *from bizrulereference
> * *where BIZREF_FORM_TYPE = form_slag
>
> //Tony
Your question is off topic, however, here is a shot-in-the-dark at the
first question:
A reasonable, but perhaps incorrect guess for 'sweac' could be a
Swedish branch of the Danish company Østasiatisk Kompagni (ØK), which
does, among other things, international trade. But commodities don't
have risk grades, so the app is likely to be an aid in deciding which
businesses are worthy of investment or venture capital. Its parent
form is likely to have something like a listbox that shows the
available business categories. Once the business category is chosen,
it appears, perhaps oddly, that separate forms handle each separate
business category, possibly to tailor the appropriate information to
show for that category. The KEY_CATEGORY value appears to store the
category number of the business category form. A KEY_CATEGORY of '1'
or '2' should limit the form_slag (Form Category) values to '1' or '2'
respectively. The business category form probably allows the user to
select various levels of acceptable risk (via combobox or listbox), to
select the group of business service area(s) (maybe by using a
multiselect listbox) under consideration, and to select the Client.
One of the service areas of the business must match the service
area(s) chosen on the form or be in a particular business sector in
order to be returned. A boolean return field is added to the results
to show if the approval date is before 30 days from today. So when
the query is run, vy_eacform_sweac20 is checked for criteria based on
the most recent entry satisfying those criteria. Next, the business
rules are applied to filter the results further. It looks like a
Status of 4 is a no-no :-). The latest 'registrated' date further
filters the data. The left joins after that are not used to filter
results. They are there to allow null/empty field values (rather than
exclude the record) when a search for a match in SWEAC or winture to
get those values turns up empty. As I said, this is a shot in the
dark, but perhaps it will help get you started. Reminder: Your
question is off topic. I might ignore any followup questions.
James A. Fortune
(E-Mail Removed)
When evaluating a start-up company for prospective investment, I do
extensive surveys to determine their likely profit, including a
complete statistical analysis of the survey results. -- J. Knapp