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: DanHD
  • Order by date
  1. DanHD

    Evaluation Functions

    hi Dana looks good for the duplicate. But how do I get this in the header? regards Dan Dan
  2. DanHD

    Evaluation Functions

    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...
  3. DanHD

    Suspress blanc document.

    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...
  4. DanHD

    SQL increment a number based on a column value

    hi this works, super! both thanks Dan Dan
  5. DanHD

    SQL increment a number based on a column value

    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
  6. DanHD

    SQL increment a number based on a column value

    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...
  7. DanHD

    Query needs to check all the records, now only the last record is checked.

    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...
  8. DanHD

    suppres lines with fields that are already conditional suppressed

    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
  9. DanHD

    suppres lines with fields that are already conditional suppressed

    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...
  10. DanHD

    search value in columns

    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...
  11. DanHD

    search value in columns

    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...
  12. DanHD

    search value in columns

    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
  13. DanHD

    import XML file with BCP

    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)]...
  14. DanHD

    suspress double fieldnames

    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
  15. DanHD

    suspress double fieldnames

    Hello I've a simple query, like: select 'PurchaseOrder' , t0.DocNum , t0.CardCode , t1.VisOrder +1 as LineNr , t1.ItemCode from OPOR t0 inner join POR1 t1 on t0.DocEntry = t1.DocEntry with the results: DocNum CardCode LineNr ItemCode -------------...
  16. DanHD

    write query results automatically to file

    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
  17. DanHD

    write query results automatically to file

    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
  18. DanHD

    write query results automatically to file

    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
  19. DanHD

    select one row/date

    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...
  20. DanHD

    select one row/date

    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...

Part and Inventory Search

Back
Top