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 Chriss Miller 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: beetlebailey
  • Content: Threads
  • Order by date
  1. beetlebailey

    Help to query date format 9/20/2005

    I need advice on how to query an Access database table column named "Date" containing the short date format, example: 9/20/2005. I would like to query based on the day (20) and return the results something like this: SELECT TTRN from ([tbl ttrn index])where day = 20 Thanks in advance.
  2. beetlebailey

    Please help me retrieve data from Access using Excel VBA

    I am trying to retrieve information from an Access database using the following SQL statement from within Excel VBA. This works fine: Set conn = New ADODB.Connection conn.ConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & "c:\temp\scelestus.mdb" &...
  3. beetlebailey

    Has anyone seen a string variable like this: $(0), zero

    I am using an Allen/Bradley 1746-BAS basic module. Within it's basic code is a variable in which I want to manipulate. The data is stored in string variable $(0) is 987723605XXXA9347286. Any ideas on how to access this string variable so I can chop it up into 3 pieces. The formula provided by...
  4. beetlebailey

    I need to break up 1 large string into 3 smaller strings

    I have $(0) which = 987723605XXXA9347286 $(1) should always be 4 characters: 9877 $(2) should always be the next 8 characters: 23605XXX $(3) should always be the last 8 characters: A9347286 Is anyone familiar on how to break this up and assign a string variable for each new string ? Thanks...
  5. beetlebailey

    How to capture data from an Ethernet device, store to MSSQL

    I have a Ethernet device that randomly sends out data. I need to be able to monitor that IP address for activity and store the data, when it become available, to MSSql 2000, Windows 2000 Server. Does anyone have any thoughts/ideas on how to go about accomplishing this ? Thanks much.
  6. beetlebailey

    Query rounds off percentages, would like actual numbers

    The following query rounds off the percentage to the closest whole number like: 96.00% I would like to see the actual value like: 95.59% Any ideas please ? cast(sum(Hour1)/(cast(Tact1 as decimal(6,2))) as decimal(6,2))*100 as Percent1 SQL 2000, Windows 2000 Pro SP4 Thank you....
  7. beetlebailey

    Please help with SQL query error if no data is present

    Please help if you can with the following SQL query. I am using a ADODB connection from Excel 2000 to a SQL 2000 database. If all three testers are present everything is fine and this query works well. But if one tester gets turned off only 2 testers are found by the query and the last tester...
  8. beetlebailey

    Please help with SQL query error if no data is present

    Please help if you can with the following SQL query. I am using a ADODB connection from Excel 2000 to a SQL 2000 database. If all three testers are present everything is fine and this query works well. But if one tester gets turned off only 2 testers are found by the query and the last tester...
  9. beetlebailey

    Change cell or font color based on data value

    I am using FrontPage 2002 on Windows 2000 sp4. I am pulling data fron a SQL server and displaying it in a table containing many cells. I want to change either the font color or background color of a cell if the returned value falls below 90. Similar to conditional formatting in Excel. Is this...
  10. beetlebailey

    How to get database result tables side by side ?

    I have a page with 2 small database result displays created using the DRW. How do I get them to display side by side each other ? I can only seem to get them on top of each other. Using FrontPage 2000, Windows 2000, SP4 MSSql 2000. Thank you for any advice.
  11. beetlebailey

    Is there another way to do this, example provided

    This query was designed and works perfectly in MSSql 2000 but will ultimately be used in FrontPage. It works fine in FrontPage until the 5 lines containing variables (marked with --) are installed then it fails. Is there perhaps another way to accomplish the same results without using the...
  12. beetlebailey

    Is there another way to do this, example provided

    This query was designed and works perfectly in MSSql 2000 but will ultimately be used in FrontPage. It works fine in FrontPage until the 5 lines containing variables (marked with --) are installed then it fails. Is there perhaps another way to accomplish the same results without using the...
  13. beetlebailey

    Problem trying to perform 3 queries based on each other

    The first select statement works fine. When I try to incorporate the next two select statements it does not work. I need the results to display in 3 seperate query results windows. The query from the vpd table should result in: Tester1 = 6, Tester2 = 7, Tester3 = 10 Can anyone see what I might...
  14. beetlebailey

    Trying to build a query based on today's date... 20th

    Hello I am trying to write a query based on today's date: select partno as [Part Number] from testers group by partno, line, [day], [hour] HAVING line=501 and [day]=20 and [hour]=6 order by line, [day], [hour] In the HAVING statement I would like to have SQL put in today's date automatically...
  15. beetlebailey

    Percentage problem converting decimal values

    Trying to use the following SQL query: Select Hour1/cast((Tact1 as decimal)*100) as PCT1 or Select Hour1/cast((Tact1 as float)*100) as PCT1 both of which return 76.923076923076934 My question is why cannot I get rid of the extra decimal points ? I would like it to be just 76.92%
  16. beetlebailey

    Please help to prevent "Divide By Zero Error" in SQL

    Hopefully this is a simple question. I am using the following error formula within Excel 2000 which prevents the #DIV/0! from showing up in the spread sheet: =IF(ISERROR(SUM(C3:C12)),0,SUM(C3:C12)) Now, I am trying to query a SQL server database with the following query and receive a "Divide by...
  17. beetlebailey

    How do I assign a SQL query reslut to a VBA variable ?

    I have a simple SQL query within Excel VBA as follows: Dim H as Integer --I have successfully opened a connection here-- SQL="Select Hour1 from vpd where line=502" Execute SQL --I have successfully closed the connection here-- Now how do get the results of Hour1 assigned to a variable H I Know...
  18. beetlebailey

    How to assign SQL query resluts to a variable

    I have a simple Excel VBA query as follows: SQL="Select Hour1 from vpd where line=502" Now how do get the results of Hour1 assigned to a variable H H = integer of 1 to 300. This seems simple enough but I am having a rough time of it. Thanks in advance, Mark
  19. beetlebailey

    How to assign SQL query resluts to a variable

    I have a simple Excel VBA query as follows: SQL="Select Hour1 from vpd where line=502" Now how do get the results of Hour1 assigned to a variable H This seems simple enough but I am having a rough time of it. Thanks in advance, Mark
  20. beetlebailey

    Please help with an Excel connection string to MSSql

    I have an Excel worksheet, (Sheet1) that I want to copy the data in cells B3:B12 into a SQL database named VPD. I am using Excel to pull data from SQL thru an ODBC connection to the remote server and it works quite well. I cannot seem to get a handle on the correct connection string and open it...

Part and Inventory Search

Back
Top