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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by snufse1

  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

    markros, You are totally right. Do not need group by "gross". I removed and now it is totaling correcly. May fault. Thank you.
  3. snufse1

    Update with Select - getting error

    Now, looks like gross is not being added up for the month update #Table1 set qty = gross select branded as product, cast(sum(gross) as decimal(15, 2)) as quantity from #Table1, tp6000.dbo.loadcomp where (branded = @Product) and...
  4. snufse1

    Update with Select - getting error

    Got it working, was missing a ")". Thank you very much. update #Table1 set qty = gross from #Table1 INNER JOIN ( select branded as Branded, cast(sum(gross) as decimal(15, 2)) as Gross from tp6000.dbo.loadcomp where branded = @ProdVar and...
  5. snufse1

    Update with Select - getting error

    Using 2005. Getting error: Incorrect syntax near the keyword 'group'.
  6. 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...
  7. snufse1

    Need to add quantities

    I think "load" is a protected word. Think I got it working: select [load], convert(char(10), Date, 101), branded, name, cast(sum(gross) as decimal(15, 2)) AS GrossTotal, cast(sum(net) as decimal(15,2)) as NetTotal from...
  8. snufse1

    Need to add quantities

    Getting Incorrect syntax near the keyword 'load'. select "load", max(convert(varchar,Date,101)) as Date, max(branded) as Branded, max(name) as Name, sum(cast(gross as decimal(15,2))) OVER (Partition by Load1.load) as GrossTotal...
  9. snufse1

    Need to add quantities

    Need to group by load (which is the bol number) select "load", date, branded, name, sum(cast(gross as decimal(15,2))) OVER (Partition by Load1."load") as GrossTotal, sum(cast(net as decimal(15,2))) OVER (Partition by Load1."load") as...
  10. 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...
  11. 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...
  12. 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...
  13. snufse1

    No able to close connections

    Crystal reports make the connection as part of the pull method. It is not in the code behind. Any ideas? Thank you.
  14. 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...

Part and Inventory Search

Back
Top