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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.