Query problem again
Will I ever get this!
I have a form template which runs fine (it registers a user
of my discussino board):
<h2>Register here to post comments to any forum on this
site </h2>
<form action="Education - Bulletin Board - Register -
code.cfm" method="post">
<p>
<strong>Username: </strong>
<input type="text" name="user" />
</p>
<p><br />
<strong>Password: </strong>
<input type="password" name="pass" />
</p>
<p><br />
<strong>Your mother's maiden name (a security
precaution if you forget your username/password and need to
retrieve them): </strong>
<input type="text" name="MaidenName" />
</p>
<p><br />
<strong>Email address (optional - in case I need to
contact you about your posts): </strong>
<input type="text" name="email" />
</p>
<p><br />
<p>
<input type="submit" value="Register!" />
<input type="button" value="Back"
onClick="self.location='index.cfm';" />
</p>
</form>
</body>
Now I want to check if the username and password have been
taken by a previous user so I use this code:
<cfif NOT structIsEmpty(form)>
<cfquery name="CheckUserName" datasource= "Education
Forum">
SELECT UserName, Count(UserName) as Duplicates
FROM ForumUsers
WHERE ForumUsers.UserName=#form.user#
GROUPBY ForumUsers.UserName
</cfquery>
<cfquery name="CheckPassword" datasource= "Education
Forum">
SELECT PassWord, Count(PassWord) as Duplicates
FROM ForumUsers
WHERE ForumUsers.Password=#form.PassWord#
GROUPBY Password
</cfquery>
I just count how many times the password has been used. If it
has been used more than once I'll later ask the new user to enter a
different password. Unfortunately, Coldfusion has a problem with
this query. Specifically, it gives me the error:
Access Driver] Syntax error (missing operator) in query
expression 'ForumUsers.UserName=jimmy GROUPBY ForumUsers.UserName'.
The Error Occurred in C:\CFusionMX\wwwroot\Education\Bulletin
Board\Education - Bulletin Board - Register - code.cfm: line 7
5 : WHERE ForumUsers.UserName=#form.user#
6 : GROUPBY ForumUsers.UserName
7 : </cfquery>
8 : <cfquery name="CheckPassword" datasource= "Education
Forum">
9 : SELECT PassWord, Count(PassWord) as Duplicates
SQL SELECT UserName, Count(UserName) as Duplicates FROM
ForumUsers WHERE ForumUsers.UserName=jimmy GROUPBY
ForumUsers.UserName
DATASOURCE Education Forum
VENDORERRORCODE -3100
SQLSTATE 42000
I've run into this before, but I don't seem to be able to
grasp the general principle involved.
I'd be very grateful if someone could explain the error in
this particular case and how I can avoid the problem in the futre.
Thanks, once again, very much in advance.
Thanks for the suggestions. I've changed the code to
incorporate the advice as far as I can. It now reads:
<cfif NOT structIsEmpty(form)>
<cfparam name = "form.user" default = 0>
<cfparam name = "form.password" default = 0>
<cfparam name = "form.Email" default = 0>
<cfparam name = "form.MaidenName" default = 0>
<cfquery name="CheckUserName" datasource= "Education
Forum">
SELECT Uname, Count(Uname) as Duplicates
FROM ForumUsers
WHERE ForumUsers.Uname='#form.user#'
GROUPBY ForumUsers.Uname
</cfquery>
<cfquery name="CheckPassword" datasource= "Education
Forum">
SELECT Pword, Count(Pword) as Duplicates
FROM ForumUsers
WHERE ForumUsers.Pword="AK"
GROUPBY Pword
</cfquery>
Unfortunately, it still fails giving me the same error:
Access Driver] Syntax error (missing operator) in query
expression 'ForumUsers.Uname='adk' GROUPBY ForumUsers.Uname'.
The Error Occurred in C:\CFusionMX\wwwroot\Education\Bulletin
Board\Education - Bulletin Board - Register - code.cfm: line 11
9 : WHERE ForumUsers.Uname='#form.user#'
10 : GROUPBY ForumUsers.Uname
11 : </cfquery>
12 : <cfquery name="CheckPassword" datasource= "Education
Forum">
13 : SELECT Pword, Count(Pword) as Duplicates
SQL SELECT Uname, Count(Uname) as Duplicates FROM ForumUsers
WHERE ForumUsers.Uname='adk' GROUPBY ForumUsers.Uname
DATASOURCE Education Forum
VENDORERRORCODE -3100
SQLSTATE 42000
I think its just a SQL error as I get the same failure
message if I replace '#form.user#' with say 'GAK'.
Any further suggestions would be greatly appreciated.
P.S. I'm still a novice, so how would I use
<cfqueryparam> tags here?
Similar Messages
-
I have a HP Pavilion dv6 with a fingerprint reader. I had the same problem as many other people when upgrading to Firefox 4, : I couldn't use the HP Simple Pass to enter a website needing a username and password by just swiping my fingerprint. I fixed the problem by downloading the new HPSimPlePass 7.0.74.0. This fixed the problem and I was very happy. Since upgrading to Firefox 5 I have the same problem again, but I already have the new version of HP Simple Pass. How can this be fixed so that I can use this fingerprint scan feature again, or where can I download Firefox 4 again?
''FredMcD [[#answer-709783|said]]''
<blockquote>
The programers know of this and are working on it.
</blockquote> -
I'm having problem again rendering a one hour presentation. If I use Command/R, the dialog box indicates seven or more days. If I highlight the selection I get essentially the same estimated time.
Command/R usually works, but not this time. Audio For Playback is checked.
The DV timeline plays in Quick Time OK.
I desperately need to get this video sent out! I even deleted preferences using the "Preference Manager" program.
DavidAll of my lecture video series are recorded in LP 16 bit audio. Each lecture is between 1 to 1.5 hr in length. I have successfully completed 10 of the 23.
Each lecture is sent to iMovie HD and then the timeline.mov is placed into FCE. One other time the timeline audio would not render, so I converted it to DV via MPEG Stream Clip and placed it back into FCE. The lecture I'm having trouble with is #11.
As mentioned, usually Command-R will do the trick in 10 minutes or so, not 6 to 10 days.
David -
Explorer problem again????
I got explorer.exe problem again,which was solved previously by creating new user account.I am free from problem for around 1 month and started again, and this time very frequently i am getting windows with message that
"Windows Explorer has stopped working".I am using windows 7 professional service pack 1.Please any body give permanent solution to this problem,Problem details are below
Problem signature:
Problem Event Name: AutoVerifierV2
Application Name: explorer.exe
Application Version: 6.1.7600.16450
Application Timestamp: 4aeba271
Fault Module Name: verifier.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdb2a
Exception Code: 80000003
Exception Offset: 0000c0de
Status Code: 201
OriginalBucketID: 0
OS Version: 6.1.7600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: e903
Additional Information 2: e90395e1c160c582c0a3c5e6d36ee788
Additional Information 3: f03b
Additional Information 4: f03b4ab77c5a1d7b156e29c2436e59a6Hello,
The TechNet Sandbox forum is designed for users to try out the new forums functionality. Please be respectful of others, and do not expect replies to questions asked here.
Since your post is off-topic, I am moving it to the
off topic forum.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book:
Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}}) -
Hello APEX people,
I posted my problem here:
Designing LOV Query Problem
What I have is a sequence like this:
CREATE SEQUENCE
DR_SEQ_FIRST_SCHEDULE_GROUP
MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
CACHE 6 ORDER CYCLE ;
What I need would be a SQL query returning all possible values oft my sequence like:
1
2
3
4
5
6
7
I want to use it as a source for a LOV...
The reason why I use the cycling sequence is: My app uses it to cycle scheduling priorities every month to groups identified by this number (1-7).
In the Admin Form, I want to restrict the assignment in a user friendly way - a LOV.
Thanks
JohannHere ist the solution (posted by michales in the PL/SQL forum):
SQL> CREATE SEQUENCE
dr_seq_first_schedule_group
MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
CACHE 6 ORDER CYCLE
Sequence created.
SQL> SELECT LEVEL sn
FROM DUAL
CONNECT BY LEVEL <= (SELECT max_value
FROM user_sequences
WHERE sequence_name = 'DR_SEQ_FIRST_SCHEDULE_GROUP')
SN
1
2
3
4
5
6
7
7 rows selected. -
SQL+-MULTI TABLE QUERY PROBLEM
HAI ALL,
ANY SUGGESTION PLEASE?
SUB: SQL+-MULTI TABLE QUERY PROBLEM
SQL+ QUERY GIVEN:
SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE,
HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE,
DLC_POLYMORPHS_NORMAL_VALUE FROM PATIENTS_MASTER1, HAEMATOLOGY1,
DIFFERENTIAL_LEUCOCYTE_COUNT1
WHERE PATIENT_NUM = HMTLY_PATIENT_NUM AND PATIENT_NUM = DLC_PATIENT_NUM AND PATIENT_NUM
= &PATIENT_NUM;
RESULT GOT:
&PATIENT_NUM =1
no rows selected
&PATIENT_NUM=2
no rows selected
&PATIENT_NUM=3
PATIENT_NUM 3
PATIENT_NAME KKKK
HMTLY_TEST_NAME HAEMATOLOGY
HMTLY_RBC_VALUE 4
HMTLY_RBC_NORMAL 4.6-6.0
DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
DLC_POLYMORPHS_VALUE 60
DLC_POLYMORPHS_NORMAL_VALUE 40-65
ACTUAL WILL BE:
&PATIENT_NUM=1
PATIENT_NUM 1
PATIENT_NAME BBBB
HMTLY_TEST_NAME HAEMATOLOGY
HMTLY_RBC_VALUE 5
HMTLY_RBC_NORMAL 4.6-6.0
&PATIENT_NUM=2
PATIENT_NUM 2
PATIENT_NAME GGGG
DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
DLC_POLYMORPHS_VALUE 42
DLC_POLYMORPHS_NORMAL_VALUE 40-65
&PATIENT_NUM=3
PATIENT_NUM 3
PATIENT_NAME KKKK
HMTLY_TEST_NAME HAEMATOLOGY
HMTLY_RBC_VALUE 4
HMTLY_RBC_NORMAL 4.6-6.0
DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
DLC_POLYMORPHS_VALUE 60
DLC_POLYMORPHS_NORMAL_VALUE 40-65
4 TABLES FOR CLINICAL LAB FOR INPUT DATA AND GET REPORT ONLY FOR TESTS MADE FOR PARTICULAR
PATIENT.
TABLE1:PATIENTS_MASTER1
COLUMNS:PATIENT_NUM, PATIENT_NAME,
VALUES:
PATIENT_NUM
1
2
3
4
PATIENT_NAME
BBBB
GGGG
KKKK
PPPP
TABLE2:TESTS_MASTER1
COLUMNS:TEST_NUM, TEST_NAME
VALUES:
TEST_NUM
1
2
TEST_NAME
HAEMATOLOGY
DIFFERENTIAL LEUCOCYTE COUNT
TABLE3:HAEMATOLOGY1
COLUMNS:
HMTLY_NUM,HMTLY_PATIENT_NUM,HMTLY_TEST_NAME,HMTLY_RBC_VALUE,HMTLY_RBC_NORMAL_VALUE
VALUES:
HMTLY_NUM
1
2
HMTLY_PATIENT_NUM
1
3
MTLY_TEST_NAME
HAEMATOLOGY
HAEMATOLOGY
HMTLY_RBC_VALUE
5
4
HMTLY_RBC_NORMAL_VALUE
4.6-6.0
4.6-6.0
TABLE4:DIFFERENTIAL_LEUCOCYTE_COUNT1
COLUMNS:DLC_NUM,DLC_PATIENT_NUM,DLC_TEST_NAME,DLC_POLYMORPHS_VALUE,DLC_POLYMORPHS_
NORMAL_VALUE,
VALUES:
DLC_NUM
1
2
DLC_PATIENT_NUM
2
3
DLC_TEST_NAME
DIFFERENTIAL LEUCOCYTE COUNT
DIFFERENTIAL LEUCOCYTE COUNT
DLC_POLYMORPHS_VALUE
42
60
DLC_POLYMORPHS_NORMAL_VALUE
40-65
40-65
THANKS
RCS
E-MAIL:[email protected]
--------I think you want an OUTER JOIN
SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE,
HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE,
DLC_POLYMORPHS_NORMAL_VALUE
FROM PATIENTS_MASTER1, HAEMATOLOGY1, DIFFERENTIAL_LEUCOCYTE_COUNT1
WHERE PATIENT_NUM = HMTLY_PATIENT_NUM (+)
AND PATIENT_NUM = DLC_PATIENT_NUM (+)
AND PATIENT_NUM = &PATIENT_NUM;Edited by: shoblock on Nov 5, 2008 12:17 PM
outer join marks became stupid emoticons or something. attempting to fix -
when i want to install windows7 on my snow leopard(10.6.4) with boot camp assistant,said that you must update your mac,i do this and try to install windows7 again but i have this problem again?what can i do?
Graham Giles wrote:
Have you seen this type of problem before? I think it could be a serious issue for anyone in a similar position.
No; but then, I've not had occasion to use TDM. I've been using firerwire drives for over 10 years, both FW400 and FW800, with no issues except a bit of instability using a B&W G3 machine.
TDM should be safe. Using cautious, manual copying of files from the Target machine to the Host machine should not result in unexpected loss of files or damage to the Target drive's directories. It should behave exactly the same as if it were an external (to the Host) firewire drive.
• I don't suppose there is anything I can do to 'put back' lost items from a separate Time Machine drive which has an up to date backup on it.
There is probably a way to do that - seems to me that's one of the reasons for a Time Machine volume.
On the other hand, if the Time Machine volume is rigidly linked to the now-absent OS on the original drive, there may be no way to effectively access the files in the TM archive.
I know that using a cloned drive would work well in this instance.
I have no experience with Time Machine, so perhaps someone who has will chime in with suggestions.
With the machine in TDM with the other machine, have you tried running Disk Utility to see if you can effect repairs to the drive? -
Why am I having update problems again?
When I started Muse today I received a message that there was a new update and did I want to install. I said yes and it proceeded, when complete I received this pop up message:
Title, Adobe AIR - "Intial content could not be loaded for this application. Try re-installing or contacting the publisher for assistance".
But you can't re-install because it shows it's already installed. This happen to me a month ago and I had to un-install Muse & reboot before I could re-install.
Why is this happening? Is there a way I could open up Muse without going through a un-install again. This only happens with Muse updates which occur when starting Muse, other Adobe updates that take place through the Creative Cloud control panel are fine.
I just tried again, same problemHelp Again.
My computer just doesn't like Muse & apparently CC programs. After all this time when starting Muse I have been ignoring the message to update because I'm afraid if I say yes I will have the above problem again. Today I got brave and said yes and Muse would not open again!
So I returned to this site and used the link you gave me before to reinstall Muse, when it finished it told me that there was a newer version 7.4 available and would I like to install it and I said yes, and it seemed to work and opens fine.
I also had a request to install the latest update of Creative Cloud so I said yes. Everything went fine. I got really brave and I noticed that there was a newer version of Muse CC 2014 and I installed it but now that CC and other CC programs tell me I need a sign in with my adobe ID to try a 30 trial, if I press the License This Software button it asks me for a Serial Number. Why can't I open CC programs without a serial number, I am a Creative Cloud member? I have 2 Icons on my desktop, Adobe Muse.exe which works and Adobe Muse CC that tells me I need a serial number. -
My Iphone Has a Restart Problem Again and Again wot To do?
MY Iphone Has a restart problem again and again wot to do please tell me
Basics from the user guide are restart, reset, restore from backup, restore as new. If you go through ALL of those steps and you still have issues, you need to get your phone checked out by Apple.
-
I sent email to [email protected] but the engineer there said he did not receive it. Also, I did not receive the email he sent to me through his sun.com email. it sounds a dns problem again.
I have changed our mx record to:
@ IN MX junk.domain.com.
before, it was:
@ IN MX junk ==>would this cause dns problems?
Here is the entry in the mail.log which seemed that sun has received my email successfully:
09-Dec-2005 09:39:10.59 tcp_local D 2 [email protected] rfc822;[email protected] [email protected] dns;btmx1.sun.com (relay1.sun.com [IntraStore TurboSendmail] ESMTP Service ready) smtp;250 recipient <[email protected]> OKYour log shows that Sun did indeed receive your mail.
Sun's mail infrastructure has been under DOS attack for some days. Sometimes that's caused delays of up to several hours for inbound mail to get to us.
We also have had some virus infected systems pounding our servers. More delays.
We do contract with an external company to scan for spam/virus scanning. Those folk historically have lost us some mails, too.
Your MX record isn't likely to make any difference in you sending out mail, but in your ability to receive mails, yes. -
Hi all,
We are encountering performance problem again
The batch process deletes 1M rows every night which took 30mins the usual.
But last night (12AM) it took more that 2hrs and hangs.
Does it help if I run gather_schena stats regularly when there is constant DELETE on the table?
Please help me check our ASH, AWR, ADDM to resolve the issue.
ADDM
https://app.box.com/s/7o734e70aa2m2zg087hf
ASH
https://app.box.com/s/xadlxfk0r5y7jvtxfsz7
AWR
https://app.box.com/s/x8ordka2gcc6ibxatvld
Thanks....
zxyHi ARM,
***What is the SGA_TARGET or MEMORY_TARGET that the database is running on?
Our server has 8Gb Physical Memory and 8Gb Swap.
What is the ideal SGA_TARGET and MEMORY_TARGET shouldbe?
Our current setting is:
========
SQL> show parameter memory
NAME TYPE VALUE
hi_shared_memory_address integer 0
memory_max_target big integer 5936M
memory_target big integer 5936M
shared_memory_address integer 0
SQL> show parameter sga_
NAME TYPE VALUE
sga_max_size big integer 5936M
sga_target big integer 0
Thanks -
Post moved to infinity board http://community.bt.com/t5/BT-Infinity/BT-Problems-Again/td-p/544347
If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’I was going to put it in the Infinity forum but as there were other similarish ones here, and that my problem is reagrding a connection issue (my modem gets Inifinity just fine), I thought thought the connection issues forum would be the correct place.
Also as HH3 is not Infinity specific, I thought the problem was not necessarily Inifinity specific either
Even so, thanks for putting in the correct place. -
Problem again with flickering and no firmware update
I've got the problem again....
I think I'll leave Imac world ....I had the flickering problem with my new iMac, it was resolved with the new software update to 10.4.6.
-
This report will take delivery document number and delivery date from user and fetches details from delivery table and fetches
corresponding sales order details and billing details and displays sales order details with ALV list.
<< Please only post the relevant portions of your code >>
i just want to know that is this way of fetching the data into internal table okay ?are there any better ways of fetching the data into the internal table ? why is it looping in work area of lips, why not in likp?
(plz dont use field-symbols or oo abap or macros) I WANT TO USE PLAIN AND SIMPLE ABAP STATEMENTS LIKE ABOVE..
By using "vbeln type lips-vbeln" are we refering to the field or data element? plz suggest.
P.S. [my approach was to inner join likp and lips into itab(my internal table).
select data from kna1, vbak,vbap,vbrp into respective internal tables like it_kna1,it_vbak etc.
then using individual loops into the tables, i would use read table to insert data into itab(my final internal table) plz suggest which method wud be more efficient? ]
Edited by: Rob Burbank on Jun 8, 2009 11:54 AMok i am posting the select queries once again.
i want to know why are we looping in t_lips and why not t_likp? bcoz tlikp is the header table, if we loop thru it and then read the rest tables then what will be the problem? plz clarify with examples._
[my idea was to loop at t_likp then read t_lips.append the lips data into t_order(main internal table).then do read table on t_kna1,t_vbap etc indexing t_order. so plz suggest whether my approach was write or wrong?if wrong why?plz site any other ways of doing this query.
types: begin of ty_vbap,
vbeln type vbap-vbeln,
posnr type vbap-posnr, .....
does the declaration statement in types refer to tables or data elements? what is the difference if we declare it like:
types: begin of ty_vbap,
vbeln type vbeln,
posnr type posnr, .....
select-options:
s_deldoc FOR likp-vbeln, " Delivery
s_dldate FOR likp-lfdat. " Delivery Date
Get delivery document number,delivery date,customer number from
delivery header table
SELECT vbeln " Delivery
lfdat " Delivery Date
kunnr " Customer Number 1
FROM likp
INTO TABLE t_likp
WHERE vbeln IN s_deldoc
AND lfdat IN s_dldate.
IF sy-subrc EQ 0.
Get Customer name for customer numbers from Customer master table
SELECT kunnr " Customer Number 1
name1 " Name 1
FROM kna1
INTO TABLE t_kna1
FOR ALL ENTRIES IN t_likp
WHERE kunnr EQ t_likp-kunnr.
IF sy-subrc EQ 0.
Get delivery item number,sales document number,sales item number,
delivery quantity from delivery item table
SELECT vbeln " Delivery
posnr " Delivery Item
vgbel " Document number of
" reference document
vgpos " Item number of reference item
lfimg " Actual quantity delivered
vrkme " Sales unit
FROM lips
INTO TABLE t_lips
FOR ALL ENTRIES IN t_likp
WHERE vbeln EQ t_likp-vbeln.
IF sy-subrc EQ 0.
Get sales document number,item number,material,material description,
ordered quantity from sales item table
SELECT vbeln " Sales Document
posnr " Sales Document Item
matnr " Material Number
arktx " Short text for sales order
" item
kwmeng " Cumulative Order Quantity
vrkme " Sales unit
FROM vbap
INTO TABLE t_vbap
FOR ALL ENTRIES IN t_lips
WHERE vbeln EQ t_lips-vgbel
AND posnr EQ t_lips-vgpos.
IF sy-subrc EQ 0.
Get sales document number ,created date,purchase order number from
sales header table
SELECT vbeln " Sales Document
erdat " Date on Which Record Was" Created
aufnr " Order Number
FROM vbak
INTO TABLE t_vbak
FOR ALL ENTRIES IN t_lips
WHERE vbeln EQ t_lips-vgbel.
IF sy-subrc EQ 0.* Get billing document number,billing item,reference delivery document
number,delivery item number,billing item from billing item table
SELECT vbeln " Billing Document
posnr " Billing item
vgbel " Document number of the
" reference document
vgpos " Item number of the" reference" item
fklmg " Billing quantity in" stockkeeping unit
vrkme " Sales unit
FROM vbrp
INTO TABLE t_vbrp
FOR ALL ENTRIES IN t_lips
WHERE vgbel EQ t_lips-vbeln
AND vgpos EQ t_lips-posnr.
ENDIF. " IF SY-SUBRC EQ 0
ENDIF. " IF SY-SUBRC EQ 0
ENDIF. " IF SY-SUBRC EQ 0
ENDIF. " IF SY-SUBRC EQ 0
ELSE.
Display message if records are not found for entered values
MESSAGE S000.
EXIT.
ENDIF. " IF SY-SUBRC EQ 0
Looping Delivery item internal table to assign values to order
internal table
LOOP AT t_lips INTO fs_lips.
Get delivery date and customer number for delivery document number
from delivery header internal table
READ TABLE t_likp WITH KEY vbeln = fs_lips-vbeln
INTO fs_likp.
Get customer name for customer number from customer master internal
table
IF sy-subrc EQ 0.
READ TABLE t_kna1 WITH KEY kunnr = fs_likp-kunnr
INTO fs_kna1.
Get sales document number,item number,ordered quantity for delivery
document number,item number from sales item internal table
IF sy-subrc EQ 0.
READ TABLE t_vbap WITH KEY vbeln = fs_lips-vgbel
posnr = fs_lips-vgpos INTO fs_vbap.
Get goods issue date and purchase order number for sales document
number from sales header internal table
IF sy-subrc EQ 0.
READ TABLE t_vbak WITH KEY vbeln = fs_vbap-vbeln INTO fs_vbak.
IF sy-subrc EQ 0.
Get billing document number,billing item,billing quantity for delivery
document number,delivery item number from billing item internal table
READ TABLE t_vbrp WITH KEY vgbel = fs_lips-vbeln
vgpos = fs_lips-posnr INTO fs_vbrp.
Assign sales,delivery,billing fields into respective fields of sales
order internal table
IF sy-subrc EQ 0.
fs_order-vbeln = fs_vbap-vbeln.
fs_order-posnr = fs_vbap-posnr.
fs_order-erdat = fs_vbak-erdat.
fs_order-kunnr = fs_likp-kunnr.
fs_order-name1 = fs_kna1-name1.
fs_order-aufnr = fs_vbak-aufnr.
fs_order-matnr = fs_vbap-matnr.
fs_order-arktx = fs_vbap-arktx.
fs_order-kwmeng = fs_vbap-kwmeng.
fs_order-vrkme = fs_vbap-vrkme.
fs_order-vbeln1 = fs_lips-vbeln.
fs_order-posnr1 = fs_lips-posnr.
fs_order-lfimg = fs_lips-lfimg.
fs_order-vrkme1 = fs_lips-vrkme.
fs_order-vbeln2 = fs_vbrp-vbeln.
fs_order-posnr2 = fs_vbrp-posnr.
fs_order-fklmg = fs_vbrp-fklmg.
fs_order-vrkme2 = fs_vbrp-vrkme.
APPEND fs_order TO t_order.
CLEAR fs_order.
ENDIF. " IF SY-SUBRC EQ 0
ENDIF. " IF SY-SUBRC EQ 0
ENDIF. " IF SY-SUBRC EQ 0
ENDIF. " IF SY-SUBRC EQ 0
ENDIF. " IF SY-SUBRC EQ 0
ENDLOOP. " LOOP AT T_LIPS INTO FS_LIPS -
Query problem in non US locale and Buddhist Era
I try to query a table with a sql statement. Then I use the result from previous statement to query again. But there's no result from the second statement??
I think it's problem with Regional Options in the machine.
I'm using w2k sp4.
JDK1.5
MySQL 4.0.18
MySQL connector 3.1.6
Locale Thai, Default Lang Thai
Here is the code
PreparedStatement ps = cn.prepareStatement("select * from EBMS_FRAUD_ATTEMPTS order by action_date asc");
date1 = rs.getDate("action_date");
cardNo1 = rs.getString("user_card_number");
action1 = rs.getString("action");
System.out.println("date1 : " + date1);
System.out.println("cardNo1 : " + cardNo1);
System.out.println("action1 : " + action1);
ps = cn.prepareStatement("select * from EBMS_FRAUD_ATTEMPTS where action_date=? and user_card_number=? and action=? order by action_date asc");
ps.setDate(1, new java.sql.Date(date1.getTime()));
ps.setString(2, cardNo1);
ps.setString(3, action1);
System.out.println("date2 : " + date2);
System.out.println("cardNo2 : " + rs.getString("user_card_number"));
System.out.println("action2 : " + rs.getString("action"));from the testing, there's no result from the 2nd statement.
Here is output from 1st statement.
date1 : 2005-03-04
cardNo1 : 1234123412341234
action1 : test1The solution can be
1. change the locale in regional options to en/US. or.
2. manually convert date in Java code using the method below before setDate parameter in the 2nd statement.
private Date convtDate(Date dInput) {
SimpleDateFormat dfUS = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.US);
SimpleDateFormat dfTH = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss", new Locale("th", "TH"));
try {
return dfTH.parse(dfUS.format(dInput));
} catch (ParseException e) {
return null;
ps = cn.prepareStatement("select * from EBMS_FRAUD_ATTEMPTS where action_date=? and user_card_number=? and action=? order by action_date asc");
ps.setMaxRows(1);
ps.setDate(1, new java.sql.Date(convtDate(date1).getTime()));
ps.setString(2, cardNo1);
ps.setString(3, action1);
...Both solutions are not good at all. The 1st solution break the run anywhere concept. The 2nd solution is hardcoding. I think there should be a better solution.So you think that is the problem? I would suggest you change "think" to "know" there before proceeding. If your solution #2 actually works (you didn't say that) then the locale most likely is the problem. In that case you should contact the maker of your JDBC driver and report the bug.
Maybe you are looking for
-
Best of the Month – October '14
Time passes, months go by, technologies evolve and replace their old selves… but the Forum doesn’t grow old, at least not by its sprit. It still has the same rush of customers swarming through its boards, trying to get help for their HP products and
-
Where is the album artwork when you store songs in an external harddrive?
I have all my songs on an external flash drive but I have the I-tunes program on the C drive of my windows laptop. In I-tunes I pointed the storage to the E drive and it all works fine. But there is one wrinkle. It looks as if some of the album artwo
-
Cisco WCS on 64 bit Windows Server 2003
I have been running WCS 4.2.62.0 on Windows 2003 R2 64 bit for some time with no issues whatsoever. Today I attempted to upgrade to WCS 5.0.56.0 and the installation terminates stating that WCS is not supported on 64 bit. My question is why this is s
-
Since using iTunes 12 on Yosemite I have constant dropouts between every song when having my library on a time capsule. I know the TC is in some kind of energy saving mode after a couple of minutes (why can't I change the length of that?) but the thi
-
How to run the FM HR_PL_D_DK_MNSTA
Hi Friends, Please let me know how to run the FM HR_PL_D_DK_MNSTA. Regards, Mihira