Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Apollo6
  • Order by date
  1. Apollo6

    Sorting results of array a second time before output?

    The below is the final version of the SQL statement. I actually got the syntax answered in another forum. "SELECT substring(convert(birthdate, sql_char),7,2), lastname, altaddr1, altaddr2, altaddr4, altcntry, birthdate FROM SOINC.UPEMPL where status <> 3 AND substring(convert(birthdate...
  2. Apollo6

    Help with correct SQL syntax using CONVERT?

    Thanks for the help... This is the final statement that I got to work... "SELECT substring(convert(birthdate, sql_char),7,2), lastname, altaddr1, altaddr2, altaddr4, altcntry, birthdate FROM SOINC.UPEMPL where status <> 3 AND substring(convert(birthdate, sql_char),5,2) = '$whatMonth'...
  3. Apollo6

    Help with correct SQL syntax using CONVERT?

    Mirtheil- I tried attempting to execute the SQL in the PCC but still get the exact same SQL error... I did determine by looking at the table design that the field [birthdate] is a 'decimal' type. That being said, how can I write the SQL statement to pull out just records where birthdate = 03...
  4. Apollo6

    Help with correct SQL syntax using CONVERT?

    From executing the version stuff, it states v8.60, I guess I was expecting something about the database itself, i.e. 2000i or something like that. I read some post that said CAST would not work with this but since I'm not using that, shouldn't be the issue. I used the syntax you stated and...
  5. Apollo6

    Help with correct SQL syntax using CONVERT?

    1. Could you help me in determining exactly which version of the database I am running on? I can see that I am running the Control Cener version 8.6; how can I determine the exact database version I am on? 2/3. Warning: SQL error: [Pervasive][ODBC Client Interface][Pervasive][ODBC Engine...
  6. Apollo6

    Help with correct SQL syntax using CONVERT?

    In my database I have a birthdate field, type decimal. Example of a record would be 19721003, i.e. 10/03/1972. I am using the following syntax where $whatMonth = '10'. Ulitmately, I want to pull out all the records with a birthday in a specific month, then order them by day: SELECT lastname...
  7. Apollo6

    Sorting results of array a second time before output?

    I tried the following and it barked as well, was this what you were thinking? "SELECT lastname, altaddr1, altaddr2, altaddr4, altcntry, birthdate FROM TOPLLC.UPEMPL where status <> 3 And date(month(birthdate)) = '$month'"; I'm hoping to find some SQL sytax that is PervaseSQL specific and allow...
  8. Apollo6

    Sorting results of array a second time before output?

    jpadie- "SELECT lastname, altaddr1, altaddr2, altaddr4, altcntry, birthdate FROM TOPLLC.UPEMPL where status <> 3 And month(birthdate) = '$month'"; I get Incompatible Types in Expression syntax error. I would assume this is do to the birthdate field is actually text and I'm applying a date...
  9. Apollo6

    Sorting results of array a second time before output?

    Both... I completely agree with the fact that I should get the SQL statement to get exactly what I want then work with that recordset. The problem is, I have not be able to determine the correct syntax, if possible, to return just the data I want. For example: $query_A = "SELECT lastname...
  10. Apollo6

    Sorting results of array a second time before output?

    I have a list of employees with birthdate as one of the fields. This field comes from the database as a string, i.e. 19721003 for 10/03/1972. The initial query pulls all employees. I then have the code working to pull just employees for a specific month. I do this by pulling out the month...
  11. Apollo6

    How to create a single recordset/array from two results?

    Itshim... Going from your idea, the following worked. $query = "SELECT DISTINCT altaddr2 FROM companyA.UPEMPL UNION SELECT DISTINCT altaddr2 FROM companyB.UPEMPL"; $result = odbc_exec($connect_companyA, $query); $rows = odbc_fetch_row($result); I still don't quite understand how it...
  12. Apollo6

    How to create a single recordset/array from two results?

    Actually, with PervasiveSQL, it is much like MSSQL, it has a Manager that you can have multiple databases on the same server. In my case, both databases live on the same server. I have done UNION queries plenty but within the same database so I am not sure it can be done across two databases...
  13. Apollo6

    How to create a single recordset/array from two results?

    jpadie... Good info, I will try and post back. Also interested in the UNION approach as it would seem to be more efficient, a single execution to get the dataset to work with.
  14. Apollo6

    How to create a single recordset/array from two results?

    sleipnir214... Sorry about that, I am going against a PervasiveSQL database. From what I've Googled, it appears to support UNION queries. Again, I just don't understand how the syntax would be. Would it be something like: $query = "SELECT employee_name FROM companyA.UPEMPL UNION SELECT...
  15. Apollo6

    How to create a single recordset/array from two results?

    sleipner214... I thought about this but couldn't get the syntax to work, specifically when you call odbc_exec. I need to execute against both databases. ???
  16. Apollo6

    How to create a single recordset/array from two results?

    Thanks jpadie. I was thinking this was what was going to be the answer. As far as looping through the $employees[] to find dups, is that a specific PHP function that I can read up on how to use. I am guessing that once I start loading in $B_rows (maybe not), I need to be checking at that...
  17. Apollo6

    How to create a single recordset/array from two results?

    I've got two databases, same schema structure, basically company A and company B. I can get the data I want from each individually but need to combine the results of identical queries then echo it out on the page, i.e an employee directory that list employees from both companies but all in one...
  18. Apollo6

    Load variable with multiple values from listbox and use in query.

    Thanks for the lead, looking into it.
  19. Apollo6

    Load variable with multiple values from listbox and use in query.

    MSAccess 2003 I have a form with two listboxes. The user moves items from listbox1 to listbox2(target). I want to move all the items from the target listbox into a variable and use that variable as criteria in a select query. The variable would need to have OR between the values due to the...
  20. Apollo6

    Displaying subreport grp totals on matching main report grp sectio

    Your correct about the other factor. Actually what I've found is that the revenue center is the second table(subreport data) is a different type of revenue center so it basically would not find a match to the revenue center on the main report. The two tables are linked by a charge(invoice)...

Part and Inventory Search

Back
Top