I'm having problems editing the results of this query in DBEdits. While I'm not positive, I think it's because of the joins in the query. Are there restrictions on editing datasets in Delphi like there are in Access? Is my problem basically that my query is not updateable?
Leslie
Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
Essential reading for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins
Code:
[navy][i]// for automatic syntax highlighting see faq102-6487
[/i][/navy]SQL.Add([teal]'SELECT M.JURNUM, PANELID, LASTNAME, FIRSTNAME, STREET1, STREET2, CITY, STATE,'[/teal] +
[teal]' ZIPCODE, RTM, CASE WHEN DNPT = '[/teal][teal]'T'[/teal][teal]' THEN '[/teal][teal]'NO'[/teal][teal]' ELSE '[/teal][teal]'YES'[/teal][teal]' END AS DNPT, CASE '[/teal] +
[teal]'WHEN DNPM = '[/teal][teal]'T'[/teal][teal]' THEN '[/teal][teal]'NO'[/teal][teal]' ELSE '[/teal][teal]'YES'[/teal][teal]' END AS DNPM, EMPNAME, REGTIMEIN, '[/teal] +
[teal]'REGTIMEOUT, PARTTIME, SUBSTITUTE, OTHER, P.COMMENTS, PUBEMP FROM JMPMAIN M '[/teal] +
[teal]'LEFT OUTER JOIN JMPPEMPLE P ON M.JURNUM = P.JURNUM '[/teal] +
[teal]'LEFT OUTER JOIN JMPPEMPLR R ON P.EMPLOYER = R.EMPCODE '[/teal] +
[teal]'WHERE PANELID LIKE '[/teal] + QuotedStr(FormatDateTime([teal]'YYMMDD'[/teal], StrToDate(PanelDate)) + [teal]'%'[/teal]) + [teal]' ORDER BY PANELID'[/teal]);
Leslie
Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
Essential reading for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins