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 strongm 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: snufse1
  • Content: Threads
  • Order by date
  1. snufse1

    Passing parm using open query

    Coming from a sequel server box and using linked server, does anyone know ho to pass a parm using open query? declare @Terminal char(1) set @Terminal = 'H' SELECT * FROM OPENQUERY(AS400SRV_MSDASQL, 'select date(digits(decimal(rcdgj + 1900000,7,0))) as transdate...
  2. snufse1

    Update with Select - getting error

    Have following query: update #table1 set qty = gross from ( select cast(sum(gross) as decimal(15, 2)) from tp6000.dbo.loadcomp where branded = @ProdVar and (@DateFrom IS Null or date >= @DateFrom) and (@DateTo IS Null or date...
  3. snufse1

    Need to add quantities

    Need to add gross and net quantities by load number (ie load). Cannot get it to work, still shows multiple row with same load number. select "load", date, branded, name, sum(cast(gross as decimal(15,2))), sum(cast(net as...
  4. snufse1

    Print - No Web dialog box being shown

    I have an ASP application that displays a Crystal Report (pull method). When I click the print icon in CR tool bar, it looks like a new page is being opened (which I think is correct) but no web dialog box is being shown (to select printer). Can someone point me in the right direction? (Also...
  5. snufse1

    Not able to print document

    I have an ASP application where I print the Crystal Report using a print button. When I run the app on my local PC it prints fine, when I run the app from the server it does not print (but gives me message that document is printed). Aany ideas? Private Sub Print_Button_Click(ByVal sender As...
  6. snufse1

    No able to close connections

    I have an asp application that uses crystal report (pull method). From a drop down list user can select dates and each time a date is selected it runs and displays a crystal report. This works fine. The problem is that I am not able to close the connection to the data base. Every time user...
  7. snufse1

    Condition the "HAVING SUM.."

    Have following query below. I only need to execute the line "HAVING SUM(dbo.EquipmentLaborEvent.Hours) < @Hours)" if @Hours being passed in is not zero. How would I do that? Thank you. @Hours INT . .. ... SELECT dbo.Equipment.CompanyEquipmentID,SUM(dbo.EquipmentLaborEvent.Hours) AS hours...
  8. snufse1

    Select and syb select - need help

    I need to do the select based upon the content (equipmentID) in #TempTable1 and bring the result into #TempTable2. I am not sure how to do the join. Can anyone help? CREATE TABLE #TempTable1 (equipmentID1 nvarchar(20)) Fill #TempTable1 here ....... Now use records in #TempTable1 as basis...
  9. snufse1

    Use of Case in the where clause

    I have a proc where I need to condition my "where" clause: create procedure get_eqmdet (in @jobnumber char(12) @costcode char(8), @suffix char(2), select ........ where glmcu = @jobnumber and...
  10. snufse1

    Linked Server - transaction interface not supported

    I have a linked server that connects to db2/400. When running the script: Insert into #JDE_EqmTable(jde_cost_code, jde_sum_hrs, jde_uom) Exec ('Call QGPL.get_eqmqty(?)', @JobNumber1) AT AS400SRV_MSOLEDB I get error: The requested operation could not be performed because OLE DB provider...
  11. snufse1

    OpenQuery to db2/400

    Have following code: declare @JobNumber1 char(12) set @JobNumber1 = ' 3505040' SELECT * FROM OPENQUERY(AS400SRV_MSDASQL, 'Call QGPL.get_eqmqty(?)' @JobNumber1) Get error: Incorrect syntax near '@JobNumber1'.
  12. snufse1

    Using OpenRowSet - connecting to db2/400

    I have problems with my sql script using linked server (not even sure if the syntax is correct). Anyway, get error: The OLE DB provider "AS400SRV_MSDASQL" has not been registered. insert into #JDE_EqmTable SELECT * FROM OPENROWSET('AS400SRV_MSDASQL','Data...
  13. snufse1

    SQl Query - storage or time limit exceeded

    I have an ASP application that calls stored procedure on a sequel server 2005 box. From there I connect to the AS400 using a linked server. Now, from time to time my ASP application return 'no record found for selection'. At this point the connection to the sequel box is closed. Looking at the...
  14. snufse1

    Problems with queries hanging and not completing

    I have an asp application that connects to a server (2005) and calls a sp. From time to time the queries do not complete and looking at the activity monitor there are several jobs out there running the same query. The only way to get the application working is to restart the server. Since I do...
  15. snufse1

    Combine script into one update statement

    Is the a way to combine below into one update? update #Equential_LaborHrsDetailTable set eq_equipment_name = ' ', eq_equipment_id = ' ' where eq_equipment_id is null update #Equential_LaborHrsDetailTable set eq_employee_hours = 0 where eq_employee_hours is Null update...
  16. snufse1

    Doing an &quot;Insert... Select&quot; - not sure what is going on

    I have following query snippet: declare @JobNumber int declare @JobNumber1 char(12) declare @ItemNumber char(20) declare @ItemNumber1 char(8) declare @DateFrom datetime declare @DateTo datetime declare @JdeDateFrom int declare @JdeDateTo int set @JobNumber = 3505040 set @JobNumber1 = '...
  17. snufse1

    Slide Show does not play

    I have a script that need to have a slide show. When I open the page the slide show loads and shows the 1st image but does not autoplay. I have tested the slide show script and as a stand alone it works. In context with other elements on the page it does not work. Any ideas? <html> <head>...
  18. snufse1

    Convert current_timestamp problem

    I have following code: declare @DateTime varchar(50) set @DateTime = convert(varchar(50), current_timestamp, 121) exec('insert into ZyTax.dbo.ttable( report_state, report_datetime select ztadds, ' + @DateTime + '...
  19. snufse1

    JavaScript Slide Show - need help please

    Below is code I plan to incorporate in my asp application. I cannot get the slid show to work. It shows the 1st image but no image rotation. Can anyone tell me what I am doing wrong? Thank you <head> <SCRIPT LANGUAGE="JavaScript"> NewImg = new Array ( "C:/Documents and Settings/vgwprja/My...
  20. snufse1

    Issue with objcet de-allocation

    I have a script that I'm running from SQL server and that basically reads a file member on the iSeries and insert records into a sql table. (I am doing the ALIAS instead of OVRDBF to point to the file member) exec('CREATE ALIAS ....') at AS400SRV_MSDASQL exec ('Call QGPL.sp_alcobj1...') AT...

Part and Inventory Search

Back
Top