MySQL Forums
Forum List  »  InnoDB

1064 Error Question
Posted by: Keith Masters
Date: September 12, 2013 02:35AM

Thanks in advance if you can help me with this question. I'm getting a 1064 error on a select query and I can't find the cause. Workbench (and a java struts app I'm working on) throw and error on the line mentioned in the error output. I'm fairly sure there isn't a limit on the number of field aliases in a select query, and it doesn't look like there is any reason to throw an error on that particular line. Any help would be appreciated.
Error Output:
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS field2398, Urine_culture AS field2399, uc_drawn AS field2400, uc_sent AS fie' at line 36
SQL Query:
SELECT encounter.id AS id, Current_contraception AS field2427, contraception_other AS field2428,
presentingtxt AS field2274, Infertility AS field2214, decreased_desire AS field2219,
constipation AS field2218, vag_bleeding AS field2221, sexissue_dryness AS field2217,
diarrhea AS field2222, vagDischarge AS field2223, dyspareunia AS field2225, fecalIncon AS field2224,
vagvulItch AS field2226, Impotence AS field2227, Hematochezia AS field2228, vulgrowth AS field2229,
orgasmIss AS field2230, Hemorrhoids AS field2231, vulvarpain AS field2232, stiexposure AS field2233,
nauseavomit AS field2234, vulsores AS field2235, pcbleeding AS field2236, vulswelling AS field2238,
rapedefilement AS field2239, Dysuria AS field2240, urinary_freq AS field2243, amenorrhea AS field2244,
bleeding AS field2245, hematuria AS field2246, dysmenorrhea AS field2247, pyschosis AS field2248,
incontinence AS field2249, intermenstrual_bleeding AS field2250, sepsis AS field2251,
urgency AS field2252, menorrhagia AS field2253, metrorrhagia AS field2254, other1 AS field2255,
other1txt AS field2256, oligomenorrhea AS field2257, other2 AS field2258, othertxt2 AS field2259,
polymenorrhea AS field2260, other3 AS field2261, other3txt AS field2262, pastobhx AS field2263,
pastgynhx AS field2264, pastmedicalhx AS field2265, pastsurgicalhx AS field2266,
Family_hx AS field2267, socialhx AS field2268, allergies AS field2269, medications AS field2270,
Weight AS field2319, height AS field2324, temp AS field2322, bp_mm AS field2331, bp_hg AS field2332,
pulse_bpm AS field2333, resp_bpm AS field2334, conscious AS field2336, jaundice AS field2338,
gcs AS field2337, pallor AS field2340, cyanosis AS field2341, heentthyroid AS field2325,
heentthyroid_txt AS field2326, vulva AS field2327, vulva_txt AS field2328, breast AS field2329,
breast_txt AS field2330, cvheart AS field2342, cvheart_txt AS field2343, vagina AS field2355,
vagina_txt AS field2356, chest_lungs AS field2344, chest_lungs_txt AS field2345, abdomen AS field2346,
abdomen_txt AS field2347, cervix AS field2357, cervix_txt AS field2359, extremities AS field2348,
extremities_txt AS field2349, lymphatics AS field2350, lymphatics_txt AS field2351,
uterus AS field2358, uterus_txt AS field2360, neuro AS field2352, neuro_txt AS field2353,
pe_other AS field2354, adnexa AS field2361, adnexa_txt AS field2362, hiv_rapid_results AS field2419,
rpr_results AS field2420, ultrasound_presentation AS field2421, ultrasound_placenta AS field2422,
ultrasound_fhts AS field2423, invest_other AS field2424, fbc AS field2369, fbc_d AS field2370,
fbc_sent AS field2371, fbc_nofunds AS field2372, fbc_na AS field2373, lfts AS field2375,
lfts_drawn AS field2376, lfts_sent AS field2377, lfts_nofunds AS field2378, lfts_na AS field2379,
cr AS field2380, cr_drawn AS field2381, cr_sent AS field2382, Cr_nofunds AS field2383,
Cr_na AS field2384, Urea_electro AS field2385, Urea_electro_d AS field2389,
Urea_electro_s AS field2386, Urea_electro_nofunds AS field2387, Urea_electro_na AS field2388,
group_save AS field2390, group_save_d AS field2391, group_save_s AS field2392,
group_save_nofunds AS field2393, group_save_na AS field2394, group_match AS field2395,
group_match_d AS field2415, group_match_s AS field2396, group_match_nofunds AS field2397,
group_ match_na AS field2398, Urine_culture AS field2399, uc_drawn AS field2400,
uc_sent AS field2401, uc_nofunds AS field2402, uc_na AS field2403, blood_culture AS field2404,
bc_drawn AS field2405, bc_sent AS field2406, bc_nofunds AS field2416, bc_na AS field2407,
ultrasound AS field2408, ultra_drawn AS field2409, ultra_sent AS field2410, ultra_nofunds AS field2411,
ultra_na AS field2412, ordered_other1 AS field2413, ordered_other1_txt AS field2414,
ordered_other2 AS field2418, ordered_other2_txt AS field2417, abdominopelvicpain AS field2271,
pyelonephritis AS field2272, abnormal_uterine_bleeding AS field2275, STIspecify AS field2276,
sti_specify_txt AS field2277, abortion AS field2278, UTI AS field2279, adnexal_mass AS field2280,
vag_discharge_undet AS field2281, appendicitis AS field2282, vaginitis_specify AS field2283,
vaginitis_specify_txt AS field2284, bartholins_mass AS field2285, abscess AS field2286,
cyst AS field2287, vulvar_lesion AS field2288, vulvar_lesion_txt AS field2289,
cancer_bcouvv AS field2290, cervicitis AS field2291, other_diagnosis1 AS field2292,
other_diagnosis_txt1 AS field2293, cholecystitis AS field2294, other_diagnosis2 AS field2295,
other_diagnosis2txt AS field2296, ectopic_preg AS field2297, other_diagnosis3 AS field2298,
other_diagnosis_txt3 AS field2299, endometritis AS field2300, other_diagnosis4 AS field2301,
other_diagnosis_txt4 AS field2302, fistula AS field2303, rvf AS field2304, vvf AS field2305,
gastroenteritis AS field2306, incontinence AS field2309, fecal_incont AS field2307,
urinary_incont AS field2308, Infertility AS field2310, Leiomyomatous AS field2311,
menstrual_irreg AS field2312, molar_preg AS field2313, pelvic_abscess AS field2314,
pelvic_prolapse AS field2315, pelvic_prolapse_ut AS field2317,
pelvic_prolapse_posteriour AS field2318, pelvic_prolapse_anterior AS field2316,
Discharge AS field2201, AdmitObservation AS field2202, AdmitCWard AS field2207,
PlanOther AS field2208, OtherPlanTxt AS field2209, AdmitSOUAnnex AS field2210,
AdmitPostNatal AS field2211, plan_desc AS field2440, discharge_date AS field2438,
uth_ward AS field1841, patient_id AS patientId, form_id AS formId, flow_id AS flowId,
date_visit AS dateVisit, pregnancy_id AS pregnancyId, last_modified AS lastModified,
created AS created, last_modified_by AS lastModifiedBy, created_by AS createdBy,
site_id AS siteId, site_name AS siteName,
CONCAT_WS(', ', u2.lastname, u2.firstname) AS lastModifiedByName, uuid FROM uthgynadmission,
encounter LEFT JOIN site ON site.id=encounter.site_id LEFT JOIN userdata.address u2 ON u2.nickname =encounter.last_modified_by WHERE encounter.id = uthgynadmission.id AND encounter.patient_id=? AND encounter.pregnancy_id=? Parameters: [216, 177]

Options: ReplyQuote


Subject
Views
Written By
Posted
1064 Error Question
3368
September 12, 2013 02:35AM
675
September 12, 2013 05:50AM
744
September 12, 2013 06:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.