2 field names called fldName from different tables

Results 1 to 2 of 2

Thread: 2 field names called fldName from different tables

  1. #1
    Join Date
    Dec 1969

    Default 2 field names called fldName from different tables

    I have an SQL that is extracting data from numerous tables, <BR>unfortunately I have 2 tables that have a field called fldname in them.<BR><BR>I having problems displaying both fldName fields<BR><BR>I&#039m using <BR>=rs ("fldName") <BR><BR>to display it, (the full SQL is written below)<BR><BR>Any help would be appreciated<BR><BR>Thanks<BR><BR>Darren<BR><BR><BR >sql="SELECT tblPrinters.fldName, tblPrinters.fld_pID, tblMagazines.fldMagazineName, tblPrinters.fldContact, tblIssues.fldIssue, tblSchedule.fldScheduleDate, tblDeadlines.fldName, tblDeadlineGroups.fldGroup FROM tblDeadlineGroups INNER JOIN ((((tblPrinters INNER JOIN tblMagazines ON tblPrinters.fld_pID = tblMagazines.fld_pID) INNER JOIN tblIssues ON tblMagazines.fldChamCode = tblIssues.fldChamCode) INNER JOIN (tblDeadlines INNER JOIN tblSchedule ON tblDeadlines.fld_deadlineID = tblSchedule.fldDeadlineID) ON tblIssues.fldIssueID = tblSchedule.fldIssueID) INNER JOIN tbl_LINK_DeadlineGroups_Deadlines ON tblDeadlines.fld_deadlineID = tbl_LINK_DeadlineGroups_Deadlines.fldDeadlineID) ON tblDeadlineGroups.fldGroup = tbl_LINK_DeadlineGroups_Deadlines.fldDeadlineGroup WHERE (((tblSchedule.fldScheduleDate) Between #"&STARTDATE&"# And #"&ENDDATE&"#)) ORDER BY tblPrinters.fldName, tblMagazines.fldMagazineName, tblIssues.fldIssue, tblSchedule.fldScheduleDate"<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: 2 field names called fldName from different ta

    Depending on your ODBC provider, you should be able to rename one of the fields as it&#039s selected. For example, somthing like:<BR><BR>SELECT fldName as fldName2, fld_pID, etc..<BR><BR>Then you can refer to it as rs("fldName2")<BR><BR>Good luck,<BR><BR>Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts