MAX alias
Just a small query.
Why is it that we need to have an alias for a MAX function to fetch the data
query = "SELECT MAX(changeLogID) AS CID " +
"FROM ChangeLog " +
"WHERE beforeUpdate like '%Status:Active%' " +
"AND beforeUpdate like '%labID:" + labID + "%'";
stmt = conn.createStatement();
rs = stmt.executeQuery(query);
while(rs.next())
System.out.println(rs.getInt("CID"));
}The above code works fine as I have an alias for MAX. However, the below code throws an error
query = "SELECT MAX(changeLogID) " +
"FROM ChangeLog " +
"WHERE beforeUpdate like '%Status:Active%' " +
"AND beforeUpdate like '%labID:" + labID + "%'";
stmt = conn.createStatement();
rs = stmt.executeQuery(query);
while(rs.next())
System.out.println(rs.getInt("changeLogID"));
java.sql.SQLException: Invalid column nameOracle:91
Pramukh wrote:
Just a small query.
Why is it that we need to have an alias for a MAX function to fetch the data
query = "SELECT MAX(changeLogID) AS CID " +
"FROM ChangeLog " +
"WHERE beforeUpdate like '%Status:Active%' " +
"AND beforeUpdate like '%labID:" + labID + "%'";
stmt = conn.createStatement();
rs = stmt.executeQuery(query);
while(rs.next())
System.out.println(rs.getInt("CID"));
}The above code works fine as I have an alias for MAX. However, the below code throws an error
query = "SELECT MAX(changeLogID) " +
"FROM ChangeLog " +
"WHERE beforeUpdate like '%Status:Active%' " +
"AND beforeUpdate like '%labID:" + labID + "%'";
stmt = conn.createStatement();
rs = stmt.executeQuery(query);
while(rs.next())
System.out.println(rs.getInt("changeLogID"));
java.sql.SQLException: Invalid column nameOracle:91changeLogID can be multiple where as Max(changeLogID) which is CID is only one. That is why you are getting en error.
Similar Messages
-
NOT GETTING SAME COM PORT FOR MY APPLICATIO​N
i am making an application to connect my PC serially to a microcontroller serially with a usb to RS232 cable. how should i code in my application to ensure that my serial connection always gets the same com port whenever the applivcation is running on an other PC? it is important to get the same com port on every machine every time else my labview coding for serial communication will fail. OR is there a better to do this. Can we code in labview so that it uses any free com port available on the PC? the user of the application must not be prompted to enter a free com port.
thanks for any help.
Attachments:
Untitled.png 32 KBNo need to shout or ring my PM box... We are all volunteers here and sometimes we sleep or eat. besides its a rather simple problem that a search on the forums would have gotten you here
My Tag cloud would have gotten you the this same example snippet :RenameAlias
Just use the system API to find all available serial devices. figure out which one is your uC (how depends on the connected device) and set the MAX Alias to "MyMicroController" or something meaningful
Jeff -
I have an Agilent 34401A that is USB. I assigned it an alias in MAX. When we swapped instrument for calibration, max found the new USB address. But when I go to add the alias in MAX I get an error saying "Alias exist" and MAX will not save the configuration.
I can't find where the existing alias is to delete it. How do I delete it? I have attached the MAX report.
Paul
Solved!
Go to Solution.
Attachments:
ni_support.zip 443 KBPlease find the follow article:
http://digital.ni.com/public.nsf/allkb/FF9EEE0B28569617862573210073B69F?OpenDocument
Hope this helps!
David H.
National Instruments -
Using a table alias to identify row with max timestamp for same ID, syntax?
Hello experts
I have created an alias of a table, so now I have table T1 and its alias T2. (T2 is not joined to anything in the universe currently)
I need to identify the row from T1 with the maximum timestamp for any given ID:
ID Timestamp
1 2011-01-24 16:26:00.000
1 2011-02-24 14:21:00.000
1 2011-02-24 13:49:00.000
I couldn't find anything on the SAP forums, but elsewhere suggested my approach should be thus:
1) Create a table alias (leave it free standing i.e. not joined) - DONE
2) For T1, create a dimension object named Timestamp - DONE
3) Create a seperate predefined condition icon funnel / filter - in the where clause:
T1.timestamp = (SELECT max(T2.timestamp) from T2 WHERE
T1.Key = T2.Key)
I'm stuck with the BO XI 3.1 syntax on step 3. I can't get it to parse.
In the where clause, mine starts with @select(T1\Timestamp) = max(@select(T2\Timestamp)
@where T1.Claim_no = T2.Claim_no)
Please can someone help me with the syntax so this thing will parse.
Many thanks in anticipation.
EddieHi ,
Can you try
SELECT ID, MAX(datetime) FROM T1 GROUP BY by ID
Thanks
Ponnarasu -
How to ask the I2C device alias name from the MAX
Hi,
How can I ask the I2C device alias name which MAX uses in Labview? If the VISA Alias on My System is for example I2C in MAX, I need to ask it in Labview and write it then to Device Reference In input of a I2C vi.
BR,
Jick
Solved!
Go to Solution.Here is a picture which should clarify the problem a bit more.
As you can see I use "I2C2" as an alias in MAX and I need somehow query that alias in Labview and write it to the device reference in input node. How?
BR,
Jick
Attachments:
pic1.JPG 21 KB -
VISA alias to TCP/IP without MAX
Hi
Is there a way to create the VISA alias for TCP/IP device (scope) without using Max?
The VISA is used to talk to TCP/IP oscilloscope.
I need to distribute hte vi executable to other PCs and I would like to avoid installing MAX just for the sake of creating the VISA alias.
Is there any trick to "cast" TCP/IP address to VISA?
thanks
Solved!
Go to Solution.Here's a snippet of the VI I made for one project. It worked well for all of the instruments I had in that rack that used Ethernet.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
IP Address to VISA Session_BD.png 21 KB -
Alias won't stay assigned in MAX
Several years ago, I developed my own NI-VISA driver for a USB spectrometer. On Windows XP, they worked great - I could plug multiple spectrometers into the system, assign each one an alias in MAX, and then acquire data from whichever spectrometer I wanted. I could even unplug a spectrometer, and plug it into a different USB port and automagically the alias would follow it.
Then came Windows 7. Suddenly (with no code changes or changes to the driver), if the spectrometer was assigned an alias, then it ALWAYS had to be plugged back into the same USB port or the alias would not follow it. The alias would still be in MAX, but the spectrometer would be on another port. It was as if the alias wasn't just linked to the device, but the specific USB port as well. I'd have to manually delete the old alias and reassign it to the "new" spectrometer & port. Annoying, but not the end of the world.
But then it got really bad... Due to a recent engineering change that moved the spectrometer further away from the PC, even a 15ft USB cable isn't long enough. I have to connect my spectrometer to the PC using a Rose USB extender (USB-to-Ethernet-to-USB). Even though I never physically unplug the spectrometer, every time the power is cycled on the PC I have to manually reassign the alias.
This is a major issue for my application. I'm at the point where I'm thinking of giving up aliases entirely and just having to search for spectrometers based on serial numbers. But if we have to swap out a spectrometer in the field, we'd have to update a serial number config file or something equally ugly. Can anyone suggest a way I might be able to make the alias behave more like it did under windows XP? Or suggest another more robust solution?
Thanks,
JasonPHi Brice,
If you look at the attached image file, you can see the problem. The entries I've circled represent the same physical device. You can see that the serial number assigned to the device has changed from "NI-USB-30002" to "NI-USB-40002". If I leave the spectrometer plugged directly into a PC, I can reboot it without issue. But if I unplug it, or if it is connected to the PC through an ethernet-based USB extender, then the reboot changes the serial number as shown. And of course, trying to access the device using the alias will fail.
In my application, I might have as many as six spectrometers connected to the same PC. If I can't use aliases, I'll have to connect with each spectrometer, query it for it's internal serial number, and match it against an configuration table. I really was hoping to avoid that if at all possible.
Thanks,
JasonP
PS: I can't find the exact documentation for the extender we have, but the one shown in the attached PDF is very similar.
Attachments:
MAX Issue.png 93 KB
icronranger2101pdf.pdf 496 KB -
Can you/how to: add additional DAQmx alias devices using MAX
Is it possible using MAX (measurement and automation explorer) to add alias devices under the Devices->DAQmx? That is, device names that map to the same hardware?
Thanks,
ToddHi Todd,
It will probably be located in a location similar to the one for I/O devices.
For instance, if you look under (assuming Windows) "C:\VXIPNP\WinNT\NIvisa", you should find a file called "visaconf.ini".
You can set the aliases within this file. Hoewver, for DAQ devices, it will probably be located in another similar type file. Unfortunately I do not have DAQ's installed on this PC. The visaconf.ini file does support GPIB cards. As I said, I don't know if the same file supports DAQ. However, check it out.
An example of how the aliases are to be configured is described in the ini file. Here is an example of mine: It renames ASRL ports to COM ports.
[VISA-CONFIG]
RefreshFindList = 0
MinAsyncCount = 1024
SharedMemSize = 131072
NumSystemSems = 512
NumProcessSems = 256
AlwaysRefresh = 0
UnloadPassports = 0
[ALIASES]
#Alias0 = "'MyDMM','GPIB0::2::INSTR'"
Alias0 = "'COM1','ASRL1::INSTR'"
Alias1 = "'COM10','ASRL3::INSTR'"
Alias2 = "'COM5','ASRL5::INSTR'"
Alias3 = "'COM6','ASRL6::INSTR'"
Alias4 = "'COM7','ASRL7::INSTR'"
Alias5 = "'COM8','ASRL8::INSTR'"
Alias6 = "'COM9','ASRL9::INSTR'"
Alias7 = "'LPT1','ASRL10::INSTR'"
Alias8 = "'COM11','ASRL11::INSTR'"
Alias9 = "'COM12','ASRL12::INSTR'"
NumAliases = 10 -
Why do I get "Evaluation Expired" message in MAX with Switch Executive
Why do I get �Evaluation Expired� message in MAX with Switch Executive on a PXI rack, which has a �Ghosted� image from and identical PXI rack(no problem with this PXI rack), when logged in as USER in Windows2000, but not when logged in as a Local Administrator. When logged in as Administrator in Windows2000 running a TestStand sequence, using a �C� code action step calling the nise.dll is ok, but not when logged in as local user. The alias switch name is unknown.
1.0.4.109 is a dll version number where as 1.0.2 is a NISE version number. The dll version number does not always line up with the product version number.
NISE 1.0 has a dll version of 1.0.1.109
NISE 1.0.1 has a dll version of 1.1.4.1
NISE 1.0.2 has a dll version of 1.2.4.7
NISE 2.0 has a dll version of 2.0.0.45154
The best way to find the product number is to launch the application and click on Help and About. You NISE version is probably 1.0 and NISE 1.0.2 will fix your licensing problem. -
What is the proper way to close all open sessions of a NI PXI-4110 for a given Device alias?
I've found that, when programming the NI PXI-4110 that, if a the VI "niDCPower Initialize With Channels VI" (NI-DCPower pallette) is called with a device
alias that all ready has one or more sessions open (due to an abort or other programming error) a device reference results from the reference out that has a (*) where "*" is post-fixed to the device reference where and is an integer starting that increments with each initialize call. In my clean up, I would like to close all open sessions. For example, let's said the device alias is "NIPower_1" in NI Max, and there are 5 open sessions; NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4). A simple initialize or reset (using niDCPower Initialize With Channels VI, or, niDCPower Initialize With Channels VI, etc.) What is the proper way to close all open sessions?
Thanks in advance. Been struggleing with this for days!When you Initialize a session to a device that already has a session open, NI-DCPower closes the previous session and returns a new one. You can verify this very easily: try to use the first session after the second session was opened.
Unfortunately, there is a small leak and that is what you encountered: the previous session remains registered with LabVIEW, since we unregister inside the Close VI and this was never called. So the name of the session still shows in the control like you noted: NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4), etc.
There may be a way to iterate over the registered sessions, but I couldn't find it. However, you can unregister them by calling "IVI Delete Session". Look for it inside "niDCPower Close.vi". If you don't have the list of open sessions, but you have the device name, then you can just append (1), (2) and so forth and call "IVI Delete Session" in a loop. There's no problem calling it on sessions that were never added.
However - I consider all this a hack. What you should do is write code that does not leak sessions. Anything you open, you should close. If you find yourself in a situation where there are a lot of leaked sessions during development, relaunching LabVIEW will clear it out. If relaunching LabVIEW is too much of an annoyance, then write a VI that does what I described above and run it when needed. You can even make it "smarter" by getting the names of all the NI-DCPower devices in your system using the System Configuration or niModInst APIs.
Hope this helps.
Marcos Kirsch
Principal Software Engineer
Core Modular Instruments Software
National Instruments -
How to fetch the Alias column values based on different column values?
Hello Gurus,
I have a table with the following struture -
"drop table T;
create table T(Name, Symbol, Amount,dep) as select
'Anderia', 'AA', 1050000,'HR' from dual union all select
'Michael', 'ML',150000,'Sales' from DUAL union all select
'Bill', 'BL', 1050000,'Finance' from dual union all select
'Nancy', 'NY', 4000,'HR' from DUAL union all select
'Anderia', 'AA',3000,'HR' from dual union all select
'Michael', 'ML',1050000,'Sales' from DUAL union all select
'Bill', 'BL', 1200000,'Finance' from DUAL union all select
'Anderia', 'AA', 1200000,'HR' from DUAL union all select
'Vish', 'VH', 1200000,'Marketing' from DUAL;"Ans try to find out the values of the column like
Name,symbol,dep,Amount,%Total,$Cumm Total, Rank but some additional columns like -
HR Amount, %HRTotal,$HR Cumm Total,
Finance Amount, %FinanceTotal,$Finance Cumm Total
Sales Amount, %SalesTotal,$Sales Cumm Total,
Marketing Amount, %MarketingTotal,$Marketing Cumm Total
then i am using the following query to fetch the Name,symbol,dep,Amount,%Total,$Cumm Total, Rank columns -
select name
, decode(grouping(symbol), 0, symbol, 'Total') symbol
, dep
, sum(amount) amount
, sum(per_total) "% Total"
, decode(grouping(symbol), 0, max(Cum_per_total), null) "% Cumm Total"
, decode(grouping(symbol), 0, max(rank), null) rank
from (
select name
, symbol
, dep
, amount
, per_total
, sum(per_total) over(order by rk) cum_per_total
, rank
, rk
from (
select name
, symbol
, dep
, sum(amount) amount
, round((sum(amount)/max(total_amount)) * 100,2) per_total
, dense_rank () over (order by sum(amount) desc) as rank
, row_number() over(order by sum(amount) desc) as rk
from (
select name
, symbol
, amount
, dep
, sum(amount) over() total_amount
, sum(amount) over ()
from t
group
by name, symbol, dep
group
by grouping sets((name, symbol, dep), ())
order by rank, max(rk) nulls lastBut i want to fetch the following columns as well.......how can i do it?-
HR Amount, %HRTotal,$HR Cumm Total,
Finance Amount, %FinanceTotal,$Finance Cumm Total
Sales Amount, %SalesTotal,$Sales Cumm Total,
Marketing Amount, %MarketingTotal,$Marketing Cumm Total
as i want all of the records, then going to specific to the dep.....do i need to use the case here?
Thanks for all of your time and effort in advanceHello Frank Kulash/Łukasz Mastaler,
Thanks for your time and effort.
I am using the Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
I am looking forward to have some additional columns (column alias) along with the the returned by the mentioned query - which are named as -
1- HR Amount
2- %HRTotal
3- %HR Cumm Total
4- Finance Amount
5- %FinanceTotal
6- %Finance Cumm Total
7- Sales Amount
8- %SalesTotal
9- %Sales Cumm Total
10 -Marketing Amount
11- %MarketingTotal
12- %Marketing Cumm Total
based on the logic like -
HR Amount = sum of amount case dep ='HR'
%HR Total = % of amount case dep ='HR'
%HR Cumm Total (cumulative % based on the cumulative total of %HR Total) = Cumm % of amount case dep ='HR'
similarly rest of the column........
Now how do i use case with a logic so that it returns me the columns as i want them ...using the above mentioned query .......
Kindly help me .....thanks in advance for all of your time -
'alias required in SELECT..' - Why can't I see this?
Please help I'm going mad here!
The error message is:
ERROR at line 1:
ORA-06550: line 113, column 37:
PLS-00402: alias required in SELECT list of cursor to avoid duplicate column
names
ORA-06550: line 113, column 37:
PL/SQL: Item ignored
ORA-06550: line 137, column 13:
PLS-00320: the declaration of the type of this expression is incomplete or
malformed
ORA-06550: line 136, column 7:
PL/SQL: SQL Statement ignored
..Yet I disagree.. I cant see any 2 fields called the same.
(FYI the cursor it speaks of is called 'c_check_employee').
And the code.
/* Formatted on 2009/02/27 15:35 (Formatter Plus v4.8.7) */
SET serveroutput ON SIZE 1000000 FORMAT WRAPPED
SET verify OFF
SET feedback OFF
DECLARE
-- Debugging/error handling
-- Work variables
p_emp_number VARCHAR2 (14);
v_rec_cnt NUMBER := 0;
insert_flag VARCHAR2 (8);
l_validate BOOLEAN DEFAULT FALSE;
l_obj NUMBER;
l_datetrack_update_mode VARCHAR2 (30) := 'CORRECTION';
l_assignment_sequence NUMBER;
l_name_combination_warning BOOLEAN := FALSE;
l_assign_payroll_warning BOOLEAN := FALSE;
l_org_now_no_manager_warning BOOLEAN;
l_other_manager_warning BOOLEAN;
l_spp_delete_warning BOOLEAN;
l_entries_changed_warning VARCHAR2 (30);
l_tax_district_changed_warning BOOLEAN;
l_person_id NUMBER;
l_assignment_id NUMBER;
l_special_ceiling_step_id NUMBER;
l_per_effective_end_date DATE
:= TO_DATE ('11-Jul-2049', 'DD-MON-YYYY');
l_people_group_id NUMBER;
l_group_name VARCHAR2 (30);
l_assignment_number VARCHAR2 (35);
l_effective_end_date DATE
:= TO_DATE ('11-Jul-2049', 'DD-MON-YYYY');
l_date DATE := SYSDATE;
ip_p_address_id per_addresses.address_id%TYPE;
ip_p_object_version_number NUMBER;
ip_p_party_id per_addresses.party_id%TYPE;
l_per_object_version_number NUMBER;
l_asg_object_version_number NUMBER;
l_full_name VARCHAR2 (240);
l_per_comment_id NUMBER;
l_per_effective_start_date DATE;
l_concatenated_segments VARCHAR2 (12);
l_soft_coding_keyflex_id NUMBER;
l_comment_id NUMBER;
l_no_managers_warning BOOLEAN;
-- Get employee details info from work table
CURSOR get_employee_details
IS
SELECT std_validate, std_person_id, std_assignment_id, std_hire_date,
std_business_group_id, std_last_name, std_sex,
std_date_of_birth, std_email_address, std_employee_number,
std_first_name, std_marital_status, std_middle_names,
std_nationality, std_title, std_national_identifier,
std_address_line1, std_address_line2, std_address_line3,
std_address_line4, std_post_code, std_telephone_1,
std_position_id, std_job_id, std_location_id,
std_organization_id, std_supervisor_id,
std_default_code_comb_id, std_set_of_books_id, std_payroll_id,
std_grade_id, std_pay_basis_id, std_assn_ovn
FROM SU_TEMPLOYEE_DETAILS;
-- checks employee details info from PER_ALL_PEOPLE_F table
CURSOR c_check_employee (p_emp_number VARCHAR2)
IS
SELECT paas.assignment_id, per.person_id, per.business_group_id,
per.last_name, per.start_date, per.date_of_birth, per.email_address,
per.employee_number, per.first_name, per.marital_status, per.middle_names,
per.nationality, per.national_identifier, per.sex, per.title, padd.address_id,
padd.primary_flag,padd.address_line1, padd.address_line2, padd.address_line3,
padd.town_or_city, padd.postal_code, padd.telephone_number_1, padd.telephone_number_2,
padd.telephone_number_3,paas.job_id, paas.location_id,paas.organization_id, paas.assignment_type, paas.primary_flag, paas.supervisor_id,paas.default_code_comb_id,
paas.set_of_books_id,paas.assignment_number, paas.period_of_service_id,paas.object_version_number
FROM per_all_people_f per,
per_all_assignments_f paas,
per_addresses padd
WHERE per.employee_number = p_emp_number
AND per.person_id = padd.person_id
AND paas.person_id(+) = per.person_id;
emp_rec c_check_employee%ROWTYPE;
-- Cursor retrieves latest Object Version Number from per_assignments_f table..
CURSOR csr_ovn (cp_person_id IN per_all_people_f.person_id%TYPE)
IS
SELECT MAX (paas.object_version_number)
FROM per_assignments_f paas, per_all_people_f per
WHERE paas.person_id = per.person_id
AND per.employee_number = paas.assignment_number
AND per.person_id = cp_person_id;
BEGIN
-- Process each record in the work table
FOR v_emp IN get_employee_details
LOOP
-- determine whether customer already exists
OPEN c_check_employee (v_emp.std_employee_number);
FETCH c_check_employee
INTO emp_rec;
IF c_check_employee%NOTFOUND
THEN
insert_flag := 'I';
ELSE
insert_flag := 'X';
END IF;
CLOSE c_check_employee;
-- Obtain the most recent Object Version Number..
OPEN csr_ovn (v_emp.std_person_id);
FETCH csr_ovn
INTO l_obj;
-- IF csr_ovn%NOTFOUND THEN RAISE NO_DATA_FOUND; END IF;
CLOSE csr_ovn;
-- Create new PER_ALL_PEOPLE_F and PER_ADDRESSES record from
-- info in table record
IF insert_flag = 'I'
THEN
BEGIN -- Importing Employee Procedure --
-- DBMS_OUTPUT.PUT (CHR (10));
-- DBMS_OUTPUT.PUT_LINE ('Importing employees.... ');
BEGIN
Hr_Employee_Api.create_gb_employee
(p_validate => l_validate,
p_hire_date => v_emp.std_hire_date,
p_business_group_id => v_emp.std_business_group_id,
p_date_of_birth => v_emp.std_date_of_birth,
p_email_address => v_emp.std_email_address,
p_first_name => v_emp.std_first_name,
p_middle_names => v_emp.std_middle_names,
p_last_name => v_emp.std_last_name,
p_sex => v_emp.std_sex,
p_ni_number => v_emp.std_national_identifier,
p_employee_number => v_emp.std_employee_number,
p_person_id => l_person_id,
p_title => v_emp.std_title,
p_assignment_id => l_assignment_id,
p_per_object_version_number => l_per_object_version_number,
p_asg_object_version_number => l_asg_object_version_number,
p_per_effective_start_date => l_per_effective_start_date,
p_per_effective_end_date => l_per_effective_end_date,
p_full_name => l_full_name,
p_per_comment_id => l_per_comment_id,
p_assignment_sequence => l_assignment_sequence,
p_assignment_number => l_assignment_number,
p_name_combination_warning => l_name_combination_warning,
p_assign_payroll_warning => l_assign_payroll_warning
Hr_Person_Address_Api.create_person_address
(p_validate => l_validate,
p_effective_date => v_emp.std_hire_date,
p_pradd_ovlapval_override => NULL,
p_validate_county => NULL,
p_person_id => l_person_id,
p_primary_flag => 'Y',
p_style => 'GB_GLB',
-- p_date_from => v_emp.std_hire_date,
p_date_from => SYSDATE,
p_date_to => NULL,
p_address_line1 => v_emp.std_address_line1,
p_address_line2 => v_emp.std_address_line2,
p_address_line3 => v_emp.std_address_line3,
p_town_or_city => v_emp.std_address_line4,
p_postal_code => v_emp.std_post_code,
p_country => v_emp.std_nationality,
p_telephone_number_1 => v_emp.std_telephone_1,
p_party_id => ip_p_party_id,
p_address_id => ip_p_address_id,
p_object_version_number => l_obj
--ip_p_object_version_number
Hr_Assignment_Api.update_emp_asg_criteria
(p_validate => l_validate,
p_effective_date => l_date, -- SYSDATE
p_datetrack_update_mode => l_datetrack_update_mode,
p_assignment_id => l_assignment_id,
p_object_version_number => l_obj,
p_organization_id => v_emp.std_organization_id,
p_location_id => v_emp.std_location_id,
p_job_id => v_emp.std_job_id,
p_position_id => v_emp.std_position_id,
p_special_ceiling_step_id => l_special_ceiling_step_id,
p_effective_start_date => l_date,
p_effective_end_date => l_effective_end_date, --IN/OUT
p_people_group_id => l_people_group_id, --IN/OUT
p_group_name => l_group_name, --IN/OUT
p_org_now_no_manager_warning => l_org_now_no_manager_warning, --IN/OUT
p_other_manager_warning => l_other_manager_warning, --IN/OUT
p_spp_delete_warning => l_spp_delete_warning, --IN/OUT
p_entries_changed_warning => l_entries_changed_warning, --IN/OUT
p_tax_district_changed_warning => l_tax_district_changed_warning --IN/OUT
Hr_Assignment_Api.update_emp_asg
(p_validate => l_validate, -- in
p_effective_date => l_date,
p_datetrack_update_mode => 'CORRECTION',
p_assignment_id => l_assignment_id,
p_object_version_number => l_obj,
p_supervisor_id => v_emp.std_supervisor_id,
p_default_code_comb_id => v_emp.std_default_code_comb_id,
p_set_of_books_id => v_emp.std_set_of_books_id,
p_concatenated_segments => l_concatenated_segments, -- out
p_soft_coding_keyflex_id => l_soft_coding_keyflex_id, -- out
p_comment_id => l_comment_id, -- out
p_effective_start_date => l_date, -- out
p_effective_end_date => l_effective_end_date,
p_no_managers_warning => l_no_managers_warning,
p_other_manager_warning => l_other_manager_warning
-- DBMS_OUTPUT.PUT_LINE ('Employee No:'|| v_emp.std_employee_number|| ' imported successfully..' );
EXCEPTION
WHEN OTHERS
THEN
RAISE NO_DATA_FOUND;
-- DBMS_OUTPUT.PUT (CHR (10));
DBMS_OUTPUT.PUT_LINE ( 'Ah, Employee:'
|| v_emp.std_employee_number
|| ' failed to load.. '
|| SQLERRM
-- DBMS_OUTPUT.PUT (CHR (10));
END;
END;
-- DBMS_OUTPUT.PUT (CHR (10));
v_rec_cnt := v_rec_cnt + 1;
-- DBMS_OUTPUT.PUT_LINE ( 'There were '|| v_rec_cnt|| ' records read in..');
-- End of customer related details
END IF;
END LOOP;
COMMIT;
END;
EXIT;
many thanks..Check primary_flag .... ;)
Regards.
Satyaki De.
Alex is Winner.... ;)
Edited by: Satyaki_De on Mar 2, 2009 5:33 PM -
How do I install a second USB-8451using an alias in our VI's?
I am trying to write VI's that use USB-8451 aliases, set up in the MAX utility. I save the alias name as "USB-8451". This usually works, but when I try to use another USB-8451 I use the following procedure:
To change NI 8451 unit out:
1: Goto C:\vxipnp\winnt\nivisa\visaconf.ini
2: Delete USB-8451 Row
3: Change NumAliases Row -1
4: Save
5: Plug in new 8451 to the computer
6: Gog NI's Measurement and Automation
7: Go to the USB device and rename the alias to "USB-8451"
As I mentioned this usually works. But currently I'm working on a laptop where the alias doesn't seem to be registering. Any hints?Hello,
The process should be the same for a desktop or a laptop computer, so I have a few questions for you. Do both of the systems have the same OS and driver versions? When you reopen the visaconf.ini file, are the settings you saved still there? When you say that the alias isn't registering, do you mean you can't set it in MAX?
I am not sure if you are using LabVIEW or not, but LabVIEW 8.2+ has autodetection of the 845x devices which may be useful to you as well.
Chris R.
Applications Engineer
National Instruments -
SQL query - Alias name (value) as parameter to an Oracle function
Hi,
I have a sql query something like
Select tbl1.valueA, tbl1.valueB, tbl2.valueX, MAX(CASE tbl2.valueY = 'XX' THEN tbl2.valueZ END) AS "ValueZ header", Function(tbl1.valueB, tbl2.valueX, "valueZ header")
FROM table1 tbl1
JOIN table2 tbl2 ON tbl1.id = tbl2.tbl1id
WHERE ...
my problem is that I need the value from MAX statement as parameter to the function and I have tried to use the alias name (valueZ header) but this is not working. I guess because of some syntax error. Can I use alias name as parameter into the function at all - if - how should I do this?Hi,
user8819407 wrote:
Hi,
I have a sql query something like
Select tbl1.valueA, tbl1.valueB, tbl2.valueX, MAX(CASE tbl2.valueY = 'XX' THEN tbl2.valueZ END) AS "ValueZ header", Function(tbl1.valueB, tbl2.valueX, "valueZ header")
FROM table1 tbl1
JOIN table2 tbl2 ON tbl1.id = tbl2.tbl1id
WHERE ...
my problem is that I need the value from MAX statement as parameter to the function and I have tried to use the alias name (valueZ header) but this is not working. I guess because of some syntax error. Can I use alias name as parameter into the function at all - if - how should I do this?You can use a column alias in the ORDER BY clause of the same query where it was defined, but that's the only place where you can use it in that query.
You could repeat the entire MAX (CASE ...) expression as the 3rd argumnet to your function, or you could compute it once in a sub-query, then reference the column alias as often as you like in the super-query, like this:
WITH got_valuez_header AS
Select tbl1.valueA
, tbl1.valueB
, tbl2.valueX
, MAX ( CASE
WEHN tbl2.valueY = 'XX' -- Don't forget the keyword WHEN
THEN tbl2.valueZ
END
) AS "ValueZ header"
FROM table1 tbl1
JOIN table2 tbl2 ON tbl1.id = tbl2.tbl1id
WHERE ...
GROUP BY ...
Select tbl1.valueA
, tbl1.valueB
, tbl2.valueX
, "ValueZ header"
, Function_x ( tbl1.valueB -- FUNCTION is not a good name for a function
, tbl2.valueX
, "ValueZ header" -- Case-sensitive
FROM got_valuez_header
; -
Fieldpoint IO points are all greyed-out and alias is "unknown"
the app was originally written in 6i or 6.1 I don't remember. I am updating and adding an Oracle backend. Anyway ...
Running LabView 7 on Win2K server, MAX 3.2
in the Fieldpoint IO point controls/indicators, all text is always greyed-out, and when I poll for FP resources, the first part of the string, the alias, shows as "unknown", not the default value = "Fieldpoint".
What am I missing??
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
[email protected]Imd2,
Have you setup your FieldPoint controller and modules in Measurement & Automation Explorer (MAX)? If you are using an Ethernet controller (FP-160x or (c)FP-20xx) then you need to set it up underneath remote systems. If you have a serial controller then you need to set it up under devices and interfaces. If this isn't the issue, then make sure that you have the correct IAK file selected by choosing browse from the FieldPoint I/O Point Control menu (click the down arrow). A configuration window will appear and make sure that you have the correct IAK file selected under the View Configuration tab.
Ames
Applications Engineering
National Instruments
Maybe you are looking for
-
How to change DRM Protection on ebooks
Hi guys, I have a few ebooks that my son added to the Sony Reader he bought for me as a present that I can no longer access as the Reader is now authorised under my email and Adobe ID but the original ebooks he purchased are still under his email and
-
When i check for the new software (both OTA and USB) it says that I have the latest release, but according to Nokia 110.48.125 should be available? Any ideas?
-
PDF not openinggggggg!!!!!!!!!!!
http://mirbeau.asso.fr/darticlesfrancais/Lair-OM%20et%20maupassant.pdf this is one of the examples of pdf not opening. It says adobe reader is blocked for this website, i click on it, Trust this site,but still Same result a black page appears. What's
-
Recurring Appointments in Outlook
Hi There, iPhone 3G connected to UK 02 Network - v2.02 Firmware I have recurring appointments in Outlook which occur 3rd Tuesday in each month. Occasionally, these conflict with other meetings so we move them to later in the day. When I do this, it m
-
What is follow on document type
what is follow on document type???from where can i see various follow on document types maintained???Anyways what are 'G','Z','A','U' follow on doc types???