Opened 12 years ago

Last modified 9 years ago

#1009 new defect

AT dataview SQL comment processng

Reported by: Kurt Endress Owned by:
Priority: minor Milestone: Server Release 1.10.1
Component: Admin Tool Version: 1.9.4 Server
Severity: Keywords: comment quote SQL
Cc: Database Engine: N/A
Operating System: N/A

Description

The AT SQL parser has problems handling comments. It apparently handles quoted strings first without regard to comments such that bare single quotes in a comment are a problem. It probably needs to evaluate the text for quted strings and comments concurrently. I believe this is handled in GrinGlobal.Core\Extensions.cs method SplitOnQuotes.

An example of some problem SQL which works in MSSS but not the AT:

SELECT

a.accession_id, -- comment with spurious '
a.accession_number_part1,
a.accession_number_part2,
a.accession_number_part3,
a.is_core,
a.is_backed_up, -- another comment with spurios '
a.backup_location1_site_id,
a.backup_location2_site_id,
a.status_code,
a.life_form_code,
a.improvement_status_code,
a.reproductive_uniformity_code,
a.initial_received_form_code,
a.initial_received_date,
a.initial_received_date_code,
a.taxonomy_species_id,
a.is_web_visible,
a.note,
a.created_date,
a.created_by,
a.modified_date,
a.modified_by,
a.owned_date,
a.owned_by

FROM

accession a

Change History (2)

comment:1 by Kurt Endress, 12 years ago

Priority: medium → minor

Simpler problem example:

SELECT

'--' AS header, -- Kurt's example
name
FROM crop

comment:2 by Mark J. Millard, 9 years ago

Milestone: Post 1.0 → Server Release 1.10.1
Note: See TracTickets for help on using tickets.