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 TouchToneTommy 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: Kirbydog
  • Order by date
  1. Kirbydog

    XML TO SQL Temp Table

    Hello, I have been trying to parse an XML fragment into an SQL temp table so that I can use in my Crystal Report 10. I tried using OPENXML but cannot get the data to flow into the table. Here is an example of what I am trying to do... DECLARE @intDoc INT DECLARE @chvXMLDoc varchar(8000)...
  2. Kirbydog

    How do I merge tables into one row?

    Good Evening, Happy New Year! I have come across a problem using Crystal Reports 10, now hold onto your horses because my question is a SQL question but it may have an answer in Crystal. I am in a high production environment where I have built a report for use in Crystal Reports 10. The...
  3. Kirbydog

    Automate SQL Query/SP

    Thanks everyone for your help, I was able to resolve the date addition/subtraction issue by the following syntax: StatusDate = CONVERT(DATETIME,CONVERT(varchar(12),GETDATE())) - 6 Which put the date portion into an interger format which allowed for the subtraction, again thanks for your...
  4. Kirbydog

    Automate SQL Query/SP

    Yes, I tried the following, DATEDIFF(day,5,StatusDate) where day is the DATE, 5 is the number to subtract so that I get to a day that was five days ago and StatusDate is the field that I want to select all days that meet this criteria. In VB it can be done with no problem but in SQL 7 I created...
  5. Kirbydog

    Automate SQL Query/SP

    Good Morning, Well the query did not work for the date addition/subtraction portion of the where clause. For some reason SQL 7 cannot perform date addition or subtraction. I tried looking in the SQL on-line books but could not find anything on subtracting dates in a where clause and...
  6. Kirbydog

    Automate SQL Query/SP

    Will do, thanks... :-) James
  7. Kirbydog

    Automate SQL Query/SP

    Thanks Krickles, I applied your solutions this morning but I won't be able to tell you anything until tomorrow morning when I get in. I created the job to run at 12:00 AM, 1:00 AM and 2:00 AM PST so we will see what happens, lets keep our fingers crossed, (X) :-). James
  8. Kirbydog

    Automate SQL Query/SP

    Hello fellow programmers, I have a situation that I need help with, I have a VB front end and a MS-SQL back end. I need to automate an update query to run once every 24 hours in order to track some inventory items. A sample of my query is as follows: UPDATE Tools03 SET TransCode = 3, TransDesc...
  9. Kirbydog

    Cannot reset SQL 7 database after deleting LDF file

    Hello Folks, Success, my solution was to restore my suspect database to a new database and then I changed my applications to point to the new database with the data still intact. Whew, I will never ever delete a log file again... Thanks for all of the help. Happy 4th Of July, :-) Sincerely...
  10. Kirbydog

    Cannot reset SQL 7 database after deleting LDF file

    Thanks J, I tried the first solution set and it worked but we had the database setup for replication, now we can not get it out of replication so that we can detach and reattach it. Once we get the database removed from replication we believe that it will be ok? Any further suggestions? James
  11. Kirbydog

    Cannot reset SQL 7 database after deleting LDF file

    We have a SQL 7 server with a database that is live, several days ago we found that the 'LDF' file had grown beyond the capacity of our hard drive, 15GB and the hard drive is 17GB so we deleted the LDF file by mistake. Now we cannot get the database from the state of suspect because the errors...
  12. Kirbydog

    Max function will not return highest value in SQL table.

    Dear Fellow Programmers, Success, James Lean's helpful insight as to the number of columns that I was trying to return hit the nail on the head. I used the colum that has the employee ID numbers and filerted for the last name and excluded the temporary numbers. The only other problems was...
  13. Kirbydog

    Max function will not return highest value in SQL table.

    I corrected that problem, now I keep geting the same error with this version of the query: EHRS.Open "SELECT MAX(EIDNUM) AS MaxID, " _ & "empLName, " _ & "empComp FROM EmpHistory " _ & "WHERE (SELECT...
  14. Kirbydog

    Max function will not return highest value in SQL table.

    Dear SQLBill, Thanks for your info, however, I think there is a ghost in my machine, I can not get your sample to run, I keeop getting a syntac error at the end of the query... I tried to get as close as your example as I could: EHRS.Open "SELECT MAX(EIDNUM) AS MaxID, " _...
  15. Kirbydog

    Max function will not return highest value in SQL table.

    Hello fellow porgrammers, I have tried to resolve a problem in the VB forum that is giving me a really difficult time. The problem is a SQL query that uses a MAX function to retrieve a value in a table that holds employee numbers and other pertinent data that supports an application that I...
  16. Kirbydog

    How do I select the highest record in a table

    Dear Glasgow, When I use the MAX(EmpHistory.EIDNUM) function I get the 3709 error or "Item not found in the Ordinal..." type error. When I take out the MAX function I am able to retrieve a record but it is the first record and not the highest record. Rocorocks suggest a slightly...
  17. Kirbydog

    How do I select the highest record in a table

    Dear Glasgow, Thanks for the info, we do have partial success, the query is retrieving the correct group but it will only retrieves the first employee number in that group. When I tried to use the MAX function on the EIDNUM field it constantly gives error 3709 or "Item cannot be found in...
  18. Kirbydog

    How do I select the highest record in a table

    Hello, The solution provided did not resolve the problem, the Max function will not return any records, it gives an error, "Item cannot be found in the collection corresponding..." the message is cut off. I tried removing the Max function, no change. If I try Glasgow's solution I...
  19. Kirbydog

    How do I select the highest record in a table

    Dear CCLINY, Yes, I only want to return one number, the highest and then I am trying to increment that number so it will become the new employee's number. I am trying the corrections that you gave me and I will let you know how it turns out, thanks...
  20. Kirbydog

    How do I select the highest record in a table

    Hello, I have an application that I built that I am having a most difficult time with. The application is an employee number generation app designed to generate employee numbers for three companies. The front end is Visual Basuc 6 and the back end is MS-SQL. I store employee information in...

Part and Inventory Search

Back
Top