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 Wanet Telecoms Ltd 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: *

  1. ersatz

    How to send 2 select from mysql database in email like tables

    fixed. it can be canceled for the second code i checked nbr of records instead of using fetchAll() $message = '<html> <head></head> <body> <table border="1" cellspacing="3" width="60%">...
  2. ersatz

    How to send 2 select from mysql database in email like tables

    ...$subject='New Batch Created'; $title='ECCA'; $date=date('Y-m-d'); //find who created the batch $user= $pdo->get_one("SELECT * FROM users WHERE user_id='".$_SESSION['uid']."'"); $c_user=$user['fname'].' '.$user['lname']; $product= $pdo->get_one("SELECT * FROM products WHERE...
  3. ersatz

    How to send 2 select from mysql database in email like tables

    ...$to=$cntd['email']; $subject='New Batch Created'; $title='ECCA'; $date=date('Y-m-d'); $user= $pdo->get_one("SELECT * FROM users WHERE user_id='".$_SESSION['uid']."'"); $c_user=$user['fname'].' '.$user['lname']; $product= $pdo->get_one("SELECT * FROM products WHERE...
  4. ersatz

    How to send 2 select from mysql database in email like tables

    ...with several rows (details table). Tested separately, works very well, but it doesn't work when I want to put both results in the text message. ********************************************************************** working...
  5. ersatz

    Rows to columns

    Hello markros, Thanks you very much for the hint, I found what I was looking for........ a very good example about Dynamic PIVOT without specifying columns Thanks again
  6. ersatz

    Rows to columns

    Hello, I have a table with 2 columns: Name SerialNumber 123 4GB6Y78 123 53F7TH 124 4GB6Y78 124 53F7TH 124 53E8BX the question is : how to get the results as following: 123 4GB6Y78 53F7TH 124 4GB6Y78 53F7TH 53E8BX ... 125 with 6 columns.... etc... Thank you very much!
  7. ersatz

    archive data

    Hi bborissov. Thank you very much for your answer. Unfortunately I can’t use sql2k8 for the moment. We’ll begin migration in 2011. I have a kind of application that store files on disk and it’s a big problem because every time when I take a db bkp I must be sure that a folder bkp is tacked too...
  8. ersatz

    archive data

    Hello, I need your help. I will tray to explain you what is my problem I must create a sql server 2005 database that will be used by a .net application. This database will contain scanned bills too. The client told me that we will have around 40 000 files every year and each file is...
  9. ersatz

    timeout issue

    Hi George, Thanks very much for your fast answer. You are a gold mine for people like me! I suppose you are connected to this forum 24 h.... Thank you for the details. Today I have changed the storproc by adding with recompile option and tomorrow I’ll verify the maintenance plan and I will...
  10. ersatz

    timeout issue

    Hi, I have a stored procedure that was implemented last year. This procedure is used once every month from aspnet page, to import data from csv file to sql server table and it takes less than 1 minute. It was ok last month but yesterday, when the client executed the same storproc he had a...
  11. ersatz

    rewrite poor query

    by creating a new view, on the first server(dwh db), with less columns and data. like i told you the query was more complicated, like select from ..union select from ..union select from.... and now is select from ...union select from..... so the problem was the the big number of data from the...
  12. ersatz

    rewrite poor query

    problem solved. the code was rewritten. thanks for your help anyway
  13. ersatz

    rewrite poor query

    yea, i k now, my english is not so good.. the query is more complicated.... it has 3 unions.... i put here juste one. i search data in 3 db, on the same server(sql 2k0. but i want to migrate one db to sql 2k5 . when i test the query, on the sql2k5, the execution time is aprox 20 minutes. on...
  14. ersatz

    rewrite poor query

    i suppose is more complicated... i don't understand how to rewrite this....
  15. ersatz

    rewrite poor query

    many many thanks, i'll try it..
  16. ersatz

    rewrite poor query

    hello, i whant to know how can i rewrite this query to not use select from()...... and select from() in the where .... thanks very much select 'COST_REVENUE' AS COST_TYPE, cr.source_system_id, cr.Trans_Sequence_No as Trans_Sequence_No, Source_System_Id +...
  17. ersatz

    how to change a stored procedure to eliminate repeted code

    ...MD_DEPT_NO INTO #MngDept FROM OPENXML (@idoc, '/R/C',1) WITH (I INT) EXEC sp_xml_removedocument @idoc; -- Xml var --select * from #MngCo --select * from #MngDiv --select * from #MngDept CREATE table #tmpZ (MD_PROJ_NO INT, MD_CO_NO INT, MD_DIV_NO INT...
  18. ersatz

    how to change a stored procedure to eliminate repeted code

    Hi George, For the moment I don't have any perf problem because the stored procedure is not yet in prod environment. I want to move this code in an external storproc or function because the same code is used by many procedures and of coarse, I am afraid that later this will be a performance...
  19. ersatz

    how to change a stored procedure to eliminate repeted code

    ...SELECT I as out_int FROM OPENXML(@idoc, '/R/C',1) WITH (I INT) Exec sp_xml_removedocument @iDoc return end GO When I test my function (SELECT * from dbo.udf_xml('<R><C I="323"/></R>')) I have this error message: Only functions and extended stored procedures can be executed from within a...
  20. ersatz

    maintenance plan, best practices

    Many thanks for your comments. I will try the new MP.

Part and Inventory Search

Back
Top