SQL with weird returns
Hello
I am trying to load data from sql in my listview, purely on Qml. However, I keep coming back to a blank page and when I use console.log (data), I'll be back a series of repeated [object Object], [object Object], [object Object]...
I don't know why that my query SQL statement works perfectly fine in SQLite Manager.
A quick search online suggest that it has something to do with the type of data passed through, but I'm still not sure why.
(Slap on my quote on my z30 because that somehow my Internet does not work when I try to connect to my Simulator will try to come back and edit my post later, but I can't disconnect my Simulator now)
My listview (which I believe works very well, request to the ListItemData.Title, ListItemData.Subtitle, ListItemData.SerialName.
I joined:
Data model of the Group {Id: dataModel},.
{} Data source
ID: customdatasource
Type: datasourcetype.sql
Source: "sql/data.sql.
Query: "SELECT title, subtitle, name FROM mytable ORDER BY codenumber series.
The loaded data: {}
Console.log ("data loaded") / / appears on the console
DataModel.clear ();
Datamodel.insertList (data);
Console.log (Data) //producing error code
}}
I know it looks messy but still once, tap on mobile. Would be grateful for the help!
Thank you!
Realized it was my problem of paging. List worked well at the long... don't know if I'm happy or not on this subject
Pls narrow thread thanks!
Tags: BlackBerry Developers
Similar Questions
-
The code formatting Pl/Sql with carriage returns
According to the Guide (User Guide for the PL/SQL and reference page 2-2)
It must be valid to use carriage returns for formatting:
"To view the structure, you can separate the lines using carriage returns and withdrawal lines help
spaces or tabs. This formatting makes the first IF statement more readable. »
But I get an error when I try it.
It seems as if there is no problem using line break, but I only have access to Oracle running under Windows.
I'm looking for confirmation (by experience or inside knowledge),
that is the case for all platforms (or at least Windows, Solaris and Linux)
Test scenarioselect banner from v$version; BANNER ------------------------------------------------------------ Oracle Database 10g Release 10.2.0.4.0 - 64bit Production PL/SQL Release 10.2.0.4.0 - Production CORE 10.2.0.4.0 Production TNS for 64-bit Windows: Version 10.2.0.4.0 - Production NLSRTL Version 10.2.0.4.0 - Production 5 rows selected. declare nl varchar2(2) := chr(10); stmt varchar2(1000); begin stmt := 'begin' || nl || ' dbms_output.put_line(''Hello'');' || nl || 'end;'; execute immediate stmt; end; / Hello PL/SQL procedure successfully completed. declare nl varchar2(2) := chr(13) || chr(10); stmt varchar2(1000); begin stmt := 'begin' || nl || ' dbms_output.put_line(''Hello'');' || nl || 'end;'; execute immediate stmt; end; / declare * ERROR at line 1: ORA-06550: line 1, column 6: PLS-00103: Encountered the symbol "" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with <en identifikator> <en identifikator, der er afgrµnset vha. dobbelte anf°rselstegn> <en tilknytningsvariabel> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe The symbol "" was ignored. ORA-06550: line 2, column 33: PLS-00103: Encountered the symbol "" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with <en identifikator> <en identifikator, der ORA-06512: at line 8 Same error when using CR only Same error on 9i BANNER ------------------------------------------------------ Oracle9i Release 9.2.0.6.0 - Production PL/SQL Release 9.2.0.6.0 - Production CORE 9.2.0.6.0 Production TNS for 32-bit Windows: Version 9.2.0.6.0 - Production NLSRTL Version 9.2.0.6.0 - Production 5 rows selected.
When you have tested 9.2.0.8 (Unix), it runs without problem when you used only a PMQ?
Yes, no problem:
SQL> select * from v$version where rownum = 1 BANNER ---------------------------------------------------------------- Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production 1 row selected. SQL> declare nl varchar2(1) := chr(10); begin execute immediate 'begin ' || nl || ' dbms_output.put_line(''Hello'');' || nl || 'end;'; end; / Hello PL/SQL procedure successfully completed. but SQL> declare nl varchar2(1) := chr(13); begin execute immediate 'begin ' || nl || ' dbms_output.put_line(''Hello'');' || nl || 'end;'; end; / Error at line 13 ORA-06550: line 1, column 7: PLS-00103: Encountered the symbol "" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with
<< close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe The symbol "" was ignored. ORA-06550: line 1, column 40: PLS-00103: Encountered the symbol "" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with -
Until the latest update when the url I wanted in the address bar of AutoComplete has been selected, it "accompanies" no more further by clicking on. I must now click the refresh arrow. It won't work even with the return. How can I operate the old way easier?
You can disable this extension in tools > Modules > Extensions and close and restart Firefox normally.
-
Advanced search and replace. How to replace the space with carriage return?
10.9.13.0/24, 10.9.4.2/32, 10.9.4.3/32 in
10.9.13.0/24
10.9.4.2/32
10.9.4.3/32Find replace them ',' with carriage return.
I still find articles on an advanced search and replace, but I can't seem to locate it.
OS X El Capitan 10.11.3
3.6.1 the numbers
HI Brendan,
You don't need an advanced find and replace for it.
In the search box, press, then space.
In the box replace by, press option-return.
Then click Find and replace and find until you are finished.
Kind regards
Barry
-
Tried to print thick paper / cartridge paper through the front power and the result is stained with weird colors. Printing through the standard power supply is perfect. Thanks in advance for your help.
Standigay
Tried to print thick paper / cartridge paper through the front power and the result is stained with weird colors. Printing through the standard power supply is perfect. Thanks in advance for your help.
Standigay
Hello
This looks like a good question for the support of Epson.
Help and Support - Epson America, Inc..:
http://www.Epson.com/cgi-bin/store/help/help.jsp?BV_UseBVCookie=Yes&category=productsConcerning
-
I try and install the SK and it fails for Web and ISO Setup > DVD drive. Same error every time:
12:22:50 Wednesday, July 11, 2012: C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\SFX\vcredist_x64.exe install failed with return code 5100
The following lines are less useful because they suggest to go to a place that I did not.
12:23:21 Wednesday, July 11, 2012: [SDKSetup:Error] Config_Products_Install: product Installation Microsoft Windows SDK for Windows 7 (failure): Please refer to Samples\Setup\HTML\ConfigDetails.htm document for more information. Fireplace: In SDKSetup.Product.ConfigureRelatedSfx () at SDKSetup.Product.ConfigureNewProduct (ManualResetEvent CancelEvent)
12:23:21 Wednesday, July 11, 2012: [SDKSetup] Config_Products_InstallNew: complete the installation of the new product: Microsoft Windows SDK for Windows 7
12:23:21 Wednesday, July 11, 2012: [SDKSetup:Error] Config_Products_Install: software Windows (failed) SDK installation: Installation of the product 'Microsoft Windows SDK for Windows 7' reported the following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm document for more information. Fireplace: SDKSetup.Product.ConfigureNewProduct (ManualResetEvent CancelEvent) at SDKSetup.Product.SetupProduct (TaskMode taskMode, ManualResetEvent CancelEvent) at SDKSetup.ProductCollection.SetupProducts (TaskMode taskMode, believing believing, ManualResetEvent cancelEvent) to the SDKSetup.ConfigProducts.DoCurrentTask (Group TaskMode)Any ideas what could be worng? The rest of the log file is too big for this message but I can send it to someone who can help.
Hello
I suggest you try the steps listed from the link below,
Windows SDK fails to install with the return Code 5100
-
How can I write a sql with a Union.
How can I write a sql with a Union.
Select emp_name, emp_no, emp_sal of the emp
If show_Less_100000 = "Yes" then emp_sal < 100000 (all values less than 100000)
otherwise the full list.
Thank you
Harsha
Published by: taty on July 31, 2012 11:28SQL> variable show_Less_100000 varchar2(3) SQL> exec :show_Less_100000 := 'Yes'; PL/SQL procedure successfully completed. SQL> select ename, 2 empno, 3 sal 4 from emp 5 where ( 6 :show_Less_100000 = 'Yes' 7 and 8 sal < 2000 9 ) 10 or nvl(:show_Less_100000,'No') != 'Yes' 11 / ENAME EMPNO SAL ---------- ---------- ---------- SMITH 7369 800 ALLEN 7499 1600 WARD 7521 1250 MARTIN 7654 1250 TURNER 7844 1500 ADAMS 7876 1100 JAMES 7900 950 MILLER 7934 1300 8 rows selected. SQL> exec :show_Less_100000 := 'All'; PL/SQL procedure successfully completed. SQL> select ename, 2 empno, 3 sal 4 from emp 5 where ( 6 :show_Less_100000 = 'Yes' 7 and 8 sal < 3000 9 ) 10 or nvl(:show_Less_100000,'No') != 'Yes' 11 / ENAME EMPNO SAL ---------- ---------- ---------- SMITH 7369 800 ALLEN 7499 1600 WARD 7521 1250 JONES 7566 2975 MARTIN 7654 1250 BLAKE 7698 2850 CLARK 7782 2450 SCOTT 7788 3000 KING 7839 5000 TURNER 7844 1500 ADAMS 7876 1100 ENAME EMPNO SAL ---------- ---------- ---------- JAMES 7900 950 FORD 7902 3000 MILLER 7934 1300 14 rows selected. SQL>
SY.
-
How to use Bulk collect in dynamic SQL with the example below:
My Question is
Using of dynamic SQL with collection in bulkif we pass the name of the table as "to the parameter' function, I want to display those
An array of column names without vowels (replace the vowels by spaces or remove vowels and display).
Please explain for example.
Thank you!!It's just a predefined type
SQL> desc sys.OdciVarchar2List sys.OdciVarchar2List VARRAY(32767) OF VARCHAR2(4000)
You can just as easily declare your own collection type (and you are probably better served declaring your own type of readability if nothing else)
SQL> ed Wrote file afiedt.buf 1 CREATE OR REPLACE 2 PROCEDURE TBL_COLS_NO_VOWELS( 3 p_owner VARCHAR2, 4 p_tbl VARCHAR2 5 ) 6 IS 7 TYPE vc2_tbl IS TABLE OF varchar2(4000); 8 v_col_list vc2_tbl ; 9 BEGIN 10 EXECUTE IMMEDIATE 'SELECT COLUMN_NAME FROM DBA_TAB_COLUMNS WHERE OWNER = :1 AND TABLE_NAME = :2 ORDER BY COLUMN_ID' 11 BULK COLLECT 12 INTO v_col_list 13 USING p_owner, 14 p_tbl; 15 FOR v_i IN 1..v_col_list.COUNT LOOP 16 DBMS_OUTPUT.PUT_LINE(TRANSLATE(v_col_list(v_i),'1AEIOU','1')); 17 END LOOP; 18* END; SQL> / Procedure created. SQL> exec tbl_cols_no_vowels( 'SCOTT', 'EMP' ); MPN NM JB MGR HRDT SL CMM DPTN PL/SQL procedure successfully completed.
Justin
-
How to fill in the right side of the shuttle with display/return values?
Hello
I know, the right way to fill in the right side of the shuttle's only:
It is comfortable for the user to see the name of the profile.declare v_list apex_application_global.vc_arr2; begin select profile_name return_value bulk collect into v_list from user_profiles where user_id = :p61_user_id; return (apex_util.table_to_string (v_list)); end;
However, I need a profile_id as return value, as I have on the left side of the shuttle.
The left side of the shuttle is filled with a selection list with display/return values, as you know.
I need both sides of the shuttle to return profile_id in order to create a merger.
How is it possible to fill the right side of the shuttle with display/return values?Make a selection list on the left side of the shuttle to return profile_name as return value as well.
In this way, the two parts of the shuttle will return the same value, which could be used as a State of fusion. -
PL/SQL V() function returns null
Hello
I just updated one of my instance of APEX of 3.0 to 3.2.1 version. After update I can't read session values using the function v (VARIABLE_NAME) of pl/sql. Always returns null (I tried v('session'), v ('app_id'), v ('app_user')).
: Reference VARIABLE works fine, but I can't use it in my own packages.
No idea how to solve this problem?
Kind regards
PrzemekHello
Are you by chance using old drop-in replacement for Patrick Wolf for the function of V?
http://www.inside-Oracle-apex.com/attention-are-you-using-drop-in-replacement-for-v-and-NV-function-2/
John.
--------------------------------------------
Blog: http://jes.blogs.shellprompt.net
Work: http://www.sumneva.com (formerly http://www.apex-evangelists.com)
Author of Pro Application Express: http://tinyurl.com/3gu7cd
AWARDS: Don't forget to mark correct or useful posts on the forum, not only for my answers, but for everyone! -
Optimize SQL with case-when-other
Hello
try to categorize DateValue into 3 groups
1. effective: current month
2. for a YEAR: between January and last month of the current year
3. for a YEAR: between January and last month of the last year
I have a feeling that my SQL could be much shorter and faster. I would be grateful for professional advice...
-case when TO_NUMBER ((TO_CHAR (DOCUMENT_TIMESTAMP, 'YYYY') |)) To_char (DOCUMENT_TIMESTAMP, 'MM'))) = TO_NUMBER (TO_CHAR (sysdate, 'YYYY') |) To_char (sysdate, 'MM'))
can 'real '.
-FOR A YEAR
When TO_NUMBER ((TO_CHAR (DOCUMENT_TIMESTAMP, 'YYYY') |)) To_char (DOCUMENT_TIMESTAMP, 'MM'))) between TO_NUMBER (TO_CHAR (sysdate, 'YYYY') |) (' 01') and TO_NUMBER (TO_CHAR (sysdate, 'YYYY') |) To_char (sysdate, 'MM'))-1
then "CDA".
-PYTD
When TO_NUMBER ((TO_CHAR (DOCUMENT_TIMESTAMP, 'YYYY') |)) To_char (DOCUMENT_TIMESTAMP, 'MM'))) between TO_NUMBER (TO_CHAR(sysdate, 'YYYY')-1). ' 01' and TO_NUMBER (TO_CHAR(sysdate, 'YYYY')-1 |) To_char (sysdate, 'MM'))-1
then "PYTD".
else "Others" end up as ABCHello
I find trunc to be more readable:
SQL> WITH DATA AS ( 2 SELECT SYSDATE d FROM dual UNION ALL 3 SELECT add_months(SYSDATE, -12) FROM dual UNION ALL 4 SELECT DATE '2009-01-01' FROM dual 5 ) 6 SELECT to_char(d, 'dd-mon-yyyy') "Date", 7 CASE 8 WHEN trunc(d, 'month') = trunc(SYSDATE, 'month') THEN 9 'Actual' 10 WHEN trunc(d, 'year') = trunc(SYSDATE, 'year') AND d < sysdate THEN 11 'YTD' 12 WHEN trunc(d, 'year') = add_months(trunc(SYSDATE, 'year'), -12) THEN 13 'PYTD' 14 END "Case" 15 FROM DATA 16 ; Date Case ----------------- ------ 10-jun-2009 Actual 10-jun-2008 PYTD 01-jan-2009 YTD
Kind regards
--
VincentPublished by: user11163377 on June 10, 2009 02:12 - corrected the CDA column
-
How to get the query of the region "PL/SQL function body returns the query string"?
Hello
is it possible to get the query string from the region of type "PL/SQL function body returns the query string"?
I can get the definition of the region as a PL/SQL procedure, but I am interested in the returned query. I tried to write something like
< pre > v_return_query: = «...» » ;
: P49_QUERY: = v_return_query;
Return v_return_query; < / pre >
to save the return on hidden item P49_QUERY string, but it does not work. I get the error message: ERR-1002 cannot find the item for the "P49_QUERY" element ID in the application '4000 '.
Kind regards
PrzemekIf you need to make reference to a page element in the block then you can use this type of control to avoid having to use generic column names:
if apex_application.get_current_flow_sgid(:APP_ID) = apex_application.get_sgid then-- runtime :P9_SQL := vSQL;else-- design time null;end if;
But if all you want to do is capture the SQL debugging you can take all the references element in the block and use the insert statement (in a debug table) as I showed earlier.
Scott
-
[need help] Function body of PL/SQL returning the SQL with BI publisher
Hello
I'm new to BI publisher, back then I used ocj4 for pdf printing, but then we got BI publisher. We want to have a better relationship, since we always used the standard one.
My pl/sql like this look
the question is how can I generate a pdf with this query using BI publisher report, what should I do?DECLARE q varchar2(4000); list_betreuer htmldb_application_global.vc_arr2; list_semester htmldb_application_global.vc_arr2; list_status htmldb_application_global.vc_arr2; BEGIN -- variable to store the list list_betreuer := HTMLDB_UTIL.STRING_TO_TABLE(:P61_BETREUER); list_semester := HTMLDB_UTIL.STRING_TO_TABLE(:P61_SEMESTER); list_status := HTMLDB_UTIL.STRING_TO_TABLE(:P61_STATUS); -- Query begins q:= 'select p1.name, p1.vorname , a1.tel, a2.tel, '; q:= q||'ab.thema, ab.status, ab.typ, s.bezeichnung, p2.name '; q:= q||'from person p1, person p2, adresse a1, adresse a2, '; q:= q||'zuordnungp_a zpa1,zuordnungp_a zpa2, '; q:= q||'abschlussarbeit ab, semester s '; q:= q||'WHERE ab.SEMESTER = s.OBJECTID (+) '; q:= q||'AND ab.STUDENT = p1.OBJECTID (+) '; q:= q||'AND ab.BETREUER = p2.OBJECTID (+) '; q:= q||'and p1.objectid = zpa1.person (+) '; q:= q||'and zpa1.adresse = a1.objectid (+) '; q:= q||'and zpa1.art (+)= ''Privat'' '; q:= q||'and p1.objectid = zpa2.person (+) '; q:= q||'and zpa2.adresse = a2.objectid (+) '; q:= q||'and zpa2.art (+)= ''Geschäft'' '; -- Loop for betreuer list FOR i in 1..list_betreuer.count LOOP IF i = 1 THEN q:= q||'AND (ab.betreuer = '||list_betreuer(i); ELSE q:= q||' OR ab.betreuer = '||list_betreuer(i); END IF; END LOOP; if (list_betreuer.count>0)THEN q:= q||')'; END IF; -- Loop for semester list FOR i in 1..list_semester.count LOOP IF i = 1 THEN q:= q||'AND (ab.semester = '||list_semester(i); ELSE q:= q||'OR ab.semester = '||list_semester(i); END IF; END LOOP; if (list_semester.count>0)THEN q:= q||')'; END IF; -- Loop for status list FOR i in 1..list_status.count LOOP IF i = 1 THEN q:= q||'AND (ab.status = '''||list_status(i)||''''; ELSE q:= q||'OR ab.status = '''||list_status(i)||''''; END IF; END LOOP; if (list_status.count>0)THEN q:= q||')'; END IF; -- htp.p(q); return q; END;
Thanks in advance
DannyCheck this out to see if this helps you. This article talks about passing parameters to the BI publisher of Apex report.
http://tylermuth.WordPress.com/2008/03/31/call-bi-Publisher-Web-services-from-apex/
Thank you!
-
Need help with a SQL qurey that returns multiple lines for a record?
I have the following query where I use a WHEN clause CASES to determine the date of a change that starts with 'FRLO' on day 1 - day14 of the pay period. It works fine if a folder schedule with a day that begins "FRLO", but if more than one day is "FRLO" then it only returns the first day he finds and not others. Is there a way to get the query to return a ron for every day 1-14 that begins "FRLO"? System if Oracle 11 G
The order of the results is not important, because this is part of a larger query that orders the results.
Thanks in advance for any help,
George
---------------------------------------------------------------------------------------------------------------------------------
SELECT s.empid,
CASE
A SUPERIOR TIME (SUBSTR (s.Day1, 0, 4)) = "FRLO".
THEN
pp.startpp
A SUPERIOR TIME (SUBSTR (s.Day2, 0, 4)) = "FRLO".
THEN
pp.startpp + 1
A SUPERIOR TIME (SUBSTR (s.Day3, 0, 4)) = "FRLO".
THEN
pp.startpp + 2
A SUPERIOR TIME (SUBSTR (s.Day4, 0, 4)) = "FRLO".
THEN
pp.startpp + 3
A SUPERIOR TIME (SUBSTR (s.Day5, 0, 4)) = "FRLO".
THEN
pp.startpp + 4
A SUPERIOR TIME (SUBSTR (s.Day6, 0, 4)) = "FRLO".
THEN
pp.startpp + 5
A SUPERIOR TIME (SUBSTR (s.Day7, 0, 4)) = "FRLO".
THEN
pp.startpp + 6
A SUPERIOR TIME (SUBSTR (s.Day8, 0, 4)) = "FRLO".
THEN
pp.startpp + 7
A SUPERIOR TIME (SUBSTR (s.Day9, 0, 4)) = "FRLO".
THEN
pp.startpp + 8
A SUPERIOR TIME (SUBSTR (s.Day10, 0, 4)) = "FRLO".
THEN
pp.startpp + 9
A SUPERIOR TIME (SUBSTR (s.Day11, 0, 4)) = "FRLO".
THEN
pp.startpp + 10
A SUPERIOR TIME (SUBSTR (s.Day12, 0, 4)) = "FRLO".
THEN
pp.startpp + 11
A SUPERIOR TIME (SUBSTR (s.Day13, 0, 4)) = "FRLO".
THEN
pp.startpp + 12
A SUPERIOR TIME (SUBSTR (s.Day14, 0, 4)) = "FRLO".
THEN
pp.startpp + 13
END
StartDate,
StartTime, NULL,
Time NULL terminator,
8 hours,
0 minutes
Time S
JOIN THE
payperiods pp
ON pp.periodid = s.periodid
WHERE SUPERIOR (SUBSTR (s.Day1, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day2, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day3, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day4, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day5, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day6, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day7, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day8, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day9, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day10, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day11, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day12, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day13, 0, 4)) = "FRLO".
OR SUPERIOR (SUBSTR (s.Day14, 0, 4)) = "FRLO";
----------------------------------------------------------------------------------------------
OUTPUT CURRENT
EMPID STARTDATE, STARTTIME ENDTIME HOURS MINUTES
753738, 25/03/2013, 8, 0
753740, 25/03/2013, 8, 0
753748, 25/03/2013, 8, 0
DESIREE OUTPUT
EMPID STARTDATE, STARTTIME ENDTIME HOURS MINUTES
753738, 25/03/2013, 8, 0
753740, 25/03/2013, 8, 0
753748, 25/03/2013, 8, 0
753738, 26/03/2013, 8, 0
753740, 26/03/2013, 8, 0
753740, 28/03/2013, 8, 0
753748, on 01/01/2013, 8, 0
753738, on 03/04/2013, 8, 0
753748, on 03/04/2013, 8, 0
-----------------------------------------------------------------------------------------------
CREATE THE TABLE PROGRAMS
(
SCHEDULEID NUMBER (12) NOT NULL,
EMPID NUMBER (12) NOT NULL,
PERIODID VARCHAR2 (6 BYTE) NOT NULL,
AREAID NUMBER (12) NOT NULL,
DAY1 VARCHAR2 (50 BYTE),
DAY 2 VARCHAR2 (50 BYTE).
DAY 3 VARCHAR2 (50 BYTE).
DAY4 VARCHAR2 (50 BYTE),
DAY5 VARCHAR2 (50 BYTE),
DAY6 VARCHAR2 (50 BYTE),
DAY 7 VARCHAR2 (50 BYTE).
JOUR8 VARCHAR2 (50 BYTE),
DAY9 VARCHAR2 (50 BYTE),
DAY10 VARCHAR2 (50 BYTE),
DAY 11 VARCHAR2 (50 BYTE).
DAY12 VARCHAR2 (50 BYTE),
J13 VARCHAR2 (50 BYTE),
DAY14 VARCHAR2 (50 BYTE),
NOPTIND1 INTEGER DEFAULT 0,
NOPTIND2 INTEGER DEFAULT 0,
NOPTIND3 INTEGER DEFAULT 0,
NOPTIND4 INTEGER DEFAULT 0,
NOPTIND5 INTEGER DEFAULT 0,
NOPTIND6 INTEGER DEFAULT 0,
NOPTIND7 INTEGER DEFAULT 0,
NOPTIND8 INTEGER DEFAULT 0,
NOPTIND9 INTEGER DEFAULT 0,
NOPTIND10 INTEGER DEFAULT 0,
NOPTIND11 INTEGER DEFAULT 0,
NOPTIND12 INTEGER DEFAULT 0,
NOPTIND13 INTEGER DEFAULT 0,
NOPTIND14 INTEGER DEFAULT 0
);
CREATE TABLE PAYPERIODS
(
PERIODID VARCHAR2 (6 BYTE) NOT NULL,
DATE OF STARTPP,
DATE OF ENDPP
);
Insert in CALENDARS
(SCHEDULEID, EMPID, PERIODID, DAY1, AREAID
DAY 2, DAY 3, DAY 4, DAY5 DAY6.
DAY7 JOUR8, DAY9, DAY10, DAY 11,.
J13, DAY14 DAY12, NOPTIND1, NOPTIND2,
NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
NOPTIND13, NOPTIND14)
Values
(3693744, 753738, '082013' 2167, 'X')
"FRLO < 1530 > ', ' < 1530 FRLO > ', '1530', '1530', '1530',
'X', 'X', '1530', '1530', 'FRLO ',.
"1530', '1530', 'X', 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
(0, 0);
Insert in CALENDARS
(SCHEDULEID, EMPID, PERIODID, DAY1, AREAID
DAY 2, DAY 3, DAY 4, DAY5 DAY6.
DAY7 JOUR8, DAY9, DAY10, DAY 11,.
J13, DAY14 DAY12, NOPTIND1, NOPTIND2,
NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
NOPTIND13, NOPTIND14)
Values
(3693745, 753740, '082013' 2167, 'X')
"FRLO < 1530 > ', ' < 1530 FRLO > ', '1530', 'FRLO', '1530',
'X', 'X', '1530', '1530', ' 1530',
"1530', '1530', 'X', 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
(0, 0);
Insert in CALENDARS
(SCHEDULEID, EMPID, PERIODID, DAY1, AREAID
DAY 2, DAY 3, DAY 4, DAY5 DAY6.
DAY7 JOUR8, DAY9, DAY10, DAY 11,.
J13, DAY14 DAY12, NOPTIND1, NOPTIND2,
NOPTIND3, NOPTIND4, NOPTIND5, NOPTIND6, NOPTIND7,
NOPTIND8, NOPTIND9, NOPTIND10, NOPTIND11, NOPTIND12,
NOPTIND13, NOPTIND14)
Values
(3693746, 753748, '082013' 2167, 'X')
"FRLO < 1530 > ', '1530', '1530', '1530', '1530',.
'X', 'X', ' FRLO < 1530 > ', '1530', 'FRLO ',.
"1530', '1530', 'X', 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
(0, 0);
COMMIT;
Insert into PAYPERIODS
(PERIODID, STARTPP)
Values
(TO_DATE '082013', (MARCH 24, 2013 00:00:00 "," MM/DD/YYYY HH24:MI:SS'));))
COMMIT;Hello
I think you want:
SELECT s.empid, pp.startpp, startdate, NULL starttime, NULL endtime, 8 hours, 0 minutes FROM schedules s JOIN payperiods pp ON pp.periodid = s.periodid WHERE UPPER (SUBSTR (s.Day1, 0, 4)) = 'FRLO' UNION SELECT s.empid, pp.startpp + 1, startdate, NULL starttime, NULL endtime, 8 hours, 0 minutes FROM schedules s JOIN payperiods pp ON pp.periodid = s.periodid WHERE UPPER (SUBSTR (s.Day2, 0, 4)) = 'FRLO' --ETC.
Kind regards
Peter
-
Create a procedure SQL with SQL toolkit
Hello
I use the SQL Toolbox to get data from a MySQL database (using ODBC connectors).
I would like to automatically create a procedure on my DB when lauching my application software, so that I do not know there is when I use it.
But I can't figure out how to do with the SQL Toolbox.
Indeed, you try to run this script (which works by operating on MySQL workbench) returns the following error:
DELIMITER $$
CREATE DEFINER='indus'@'%' PROCEDURE ' FPY'(datetime IN START_DATETIME, IN END_DATETIME datetime)
BEGIN
CREATE a temporary table ListingUUT
(
UUT_SERIAL_NUMBER VARCHAR (127).
TEST_COUNTER INT,
DateTime TEST_TIME,
UUT_STATUS VARCHAR (32)
);CREATE a temporary table Stat_FPY
(
TESTED INT,
TESTED_ONCE INT,
REPORT / FLOAT
);INSERT INTO Stat_FPY VALUES (0,0,0).
INSERT INTO ListingUUT
(
SELECT
UUT_SERIAL_NUMBER, SUM (1), START_DATE_TIME, UUT_STATUS
OF booster_results.uut_result
WHERE START_DATE_TIME BETWEEN START_DATETIME AND END_DATETIME
UUT_SERIAL_NUMBER GROUP
ORDER BY DESC START_DATE_TIME
)
;END
-Online error-2147217900 took place at NI_Database_API.lvlib:Conn Execute.vi-> Untitled 1
Possible reasons:
ADO error: 0x80040E14
Exception occurred in the Microsoft OLE DB provider for ODBC drivers: [MySQL] [ODBC 5.2.a Driver] [mysqld - 5.6.10 - log] you have an error in your syntax SQL; consult the manual for your version of the MySQL server for the right syntax to use near ' DELIMITER $$CREATE DEFINER='indus'@'%' PROCEDURE ' FPY '(IN START_DATETIME datet' à la ligne 1 en NI_Database_API.lvlib:Conn Execute.vi-> sans titre 1)
An idea so that I can create the procedure?
Finally, give up on the creation of the procedure with SQL Toolkit functions.
In fact using exec.vi system to address directly the command-line mysql server...
Maybe you are looking for
-
Need drivers for Satellite 5200-902
I'm looking for a complete set of Satellite 5200-902 drivers. Can someone help me?Thank you.
-
Ensure that a single NSV is delivered
I have a project with a compactRIO, stream of data to a PC via the network stream. I use VNRS to share state information between devices (i.e.. a Boolean value that indicates if the HARD disk on the compactRIO is full). NSV is deployed to the compact
-
What is the NI Switch Executive advantage? Nothing wrong with using this product?
Hello We are looking in using the software OR go Exec to integrate with our switching matrix. This layer NOR seems to work well with TestStand and many apparent advantages. For our project, this includes not having to write several subsequences in: c
-
Installation of "DEFAULT MAIL CLIENT" for / in Windows Internet Explorer
Dear all, I tried to send an email by clicking on the name of a person on a Web site, but it appeared a message of Windows Internet Explorer, saying that 'default e-mail client' is not properly installed. Could you please let me know in detail what
-
AutoPlay Vista execution engine does not
I get the error message from AutoPlay engine with all the news of the DVD I insert. When the DVD is put into a separate computer running XP they play perfectly on demand. The fixes are available?