hello
I want to use (learn to understand) the evaluation functions.
In an invoice we’ve on line level the reference number to the sales order . The Invoice is created from multiple sales orders.
In need those reference numbers singular printed in the header of the invoice.
In the line reference...
Hello
I’ve created a stored procedure as input for my Crystal Report for open orders. In the SP aren’t any selection variables.
In Crystal Report I’ve a selection on customers. When I select for example customer 1 to 5, the stored procedure gives customer 1, 3 and 5 as result with them open...
hello
I'm sorry, I've tried my own code also on another database.
The example data is correct. But there are over 3000 records. I think the union is not a realistic option in this case.
I've tried partition by, while, a cursur. But maybe there is a much better solution for this.
Dan
hello
I have a tabele with 3 colums. I need to increment the value of the row with 1 eachtime the partner changes (see column row2)
number partner row row2
1 A100 5 5
2 A100 5 6
3 A100 5 7
4 A200 28 28
5...
hello
I've written a query (base of a more complex one) that I used to test all the records of a document in a stored procedure.
In this simple example it's checks the quantity on row level in a document is = 1, the an error message will follow.
My problem is that the check only works on the...
hi
no is not possible. Because the stored procedure I've created, make it necessary (to many fields) to place each item as 3 rows in a record/section. In this example the third row is empty, so I can not suppress the whole section.
Dan
Hello
I have created a stored procedure that I use for import for my Crystal Report and gives some information about Items.
Because the Item records holds many fields, in the report I put some records among each other in one detail line (i didn't create extra lines in the section manager). So...
hello
I found an example on google and rewrite it for my case:
WITH MyCTE (ItemCode, Amount, Price, RowVersion)
AS(
select ItemCode, Amount, Price
, ROW_NUMBER() OVER(PARTITION BY itemcode ORDER BY Amount ASC) RowVersion
from SPP2
)
SELECT BASE.ItemCode
,BASE.Amount as AmountFrom...
hi
I can't modify the table. It's part of an ERP system and it's just a part of my problem.
But I try to break it down in small parts.
I think something with row() to get the fitst and next row 'amount' on one line (I forgot, also the item is in the table, but no rownumber)
Item qty discount...
hello,
in the discount table is a column with volume discount:
qty discount
10 15%
20 18%
30 19%
I've a quantity of 25, how can I find the right discount, in this case 18%
Dan
Hello
I try to import a xml file in MSSQL database with the bcp command:
EXEC master..xp_cmdshell 'bcp Database.table in C:\Users\Desktop\test.xml -x -U sa -P password'
I receive the message in sql query results window: Enter the file storage type of field _PRODUCT_CODE [nvarchar(max)]...
Thanx drlex
this will help me.
(it is also possible to run querys directly in the user interface of the ERP software. So a report as CR is not always desired by the user)
Dan
hi Bill
thanks for your input.
I found a solution for me on the net by using the Xp_cmdshell in combination with BCP.
http://www.sqlteam.com/article/exporting-data-programatically-with-bcp-and-xp_cmdshell
Dan
hi Bill
this works fine, but one problem: There will be also print some unwantend text and lines into the file, like
Job 'test2' : Step 1, '1' : Began Executing 2012-01-12 22:11:13
----------------
----------------
We need the file as import in another programm.
How can I skip those text?
Dan
Hello
I’m looking at the following issue
We want to run at night a query in the mssql server (for example as a job), and let the results written to a csv file on the server.
What is the best way to do this?
Dan
Hi
So far so good.
I tried to build further on the latest method of markros.
I need an extra column from the OINM table: the transtype.
And that gives a problem in the group by, I got too much rows back.
The other method with ‘partition by’ don’t works in the ERP program.
select t0.itemcode...
Thanks very much, this solves the issue.
I get now the same result with the #temp table by mine own solution.
But which method prefers? Both ways use a temp table. Is it because 'Markros' method is quicker to write? Faster for the server? Or more power full?
(just for the ‘learning’ aspect and...
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.