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

    again problem with multiple joins within a string...HELPPP!

    ...+ 'a.[id] as ''[Files ID]'',' + 'd.startTime as ''[Start Date]'',' + 'count(*) as ''[Count]''' + 'FROM ' + @db + '.dbo.filo_files a join ' + @db + '.dbo.semantica_corpora b on a.[id] = b.documentkey ' + 'join...
  2. jtammyg

    again problem with multiple joins within a string...HELPPP!

    Hi LNBruno Thanks so much for your reply! how do u print the @sql? sorry I know is a stupid question. Thanks a lot!!!!!!!!!!!!!!!!! Tammy :-)
  3. jtammyg

    again problem with multiple joins within a string...HELPPP!

    ...+ 'a.[id] as ''[Files ID]'',' + 'd.startTime as ''[Start Date]'',' + 'count(*) as ''[Count]''' + 'FROM ' + @db + '.dbo.filo_files a join ' + @db + '.dbo.semantica_corpora b on a.[id] = b.documentkey ' + 'join...
  4. jtammyg

    join within a string?

    George, I already have found the problem. It was the one you pointed out AND '(cast(Sum(ff.length) as decimal)/1048576) as ''[Original File Size (MB)]''' + see the alias ff in length? Tammy
  5. jtammyg

    join within a string?

    SQLSister, It still gives me the error in the select statement. Any other ideas here? Can a join be done within the string or not? Thanks! Tammy
  6. jtammyg

    join within a string?

    ...+ @db1 + '''' + ' as ''[Database Name]'',' + 'a.name as ''[Custodian Name]'',' + 'NULL as ''[Create Date]'',' + 'count(*) as ''[Original File Count]'',' + '(cast(Sum(ff.length) as decimal)/1048576) as ''[Original File Size (MB)]''' + 'FROM ' +...
  7. jtammyg

    @set sql6 = need to put a join table in here...HELP!!!!

    Thank you so much! It's working now!!!!! That was a typo. :-) Tammy
  8. jtammyg

    @set sql6 = need to put a join table in here...HELP!!!!

    Hi Borislav! Sorry I meant to say there are selects within selects and they do not seem to work. This is the error message I get: Server: Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'from'. Server: Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword...
  9. jtammyg

    @set sql6 = need to put a join table in here...HELP!!!!

    hi! Im running the folowing code to loop through all the databases and insert the results in a temp table. In this case I need to run a join within a @sql string, but it does not work. Any ideas on how I can achieve this? Here is my code: if exists (select [id] from...
  10. jtammyg

    looping through all databases and executing a stored procedure while d

    ...datetime,@PreviousDateEnd datetime) AS --insert all the fields from Matters into a temp table to use the title of the project select * into #temp_matter from Matters -- SELECT RTRIM(CONVERT(VARCHAR(255), SERVERPROPERTY('ServerName'))) + '.' + DB_NAME(DB_ID()) AS...
  11. jtammyg

    how to do a sum product in sql server

    We need to group by hospital and hospital appears multiple times.
  12. jtammyg

    how to do a sum product in sql server

    The results of the multiplication only 0.244 0.254 26.7 After that is done I want to do the sum. Thank you! Tammy
  13. jtammyg

    how to do a sum product in sql server

    Thank you vongrunt...but the sum that way does not give me the result expected :( the sum of the parts etc etc...rule Thank you anyways! Tammy
  14. jtammyg

    how to do a sum product in sql server

    I need to do a sumproduct in SQL Server ALL_HOSPITALS table days percentage days avoidable 1 0.244 2 0.127 30 0.890 The calculation would be 0.244*1+0.127*2+0.890*30 The total of the above has to be divided by the sum of days. I am planning on having a temp table with the hosp name field and...
  15. jtammyg

    Evaluating an aggregate

    ...percentage days avoidable 1 0.244 2 0.127 30 0.890 The calculation would be 0.244*1+0.127*2+0.890*30 The total of the above has to be divided by the sum of days. I am planning on having a temp table with the hosp name field and...
  16. jtammyg

    error 20997 when running an application that calls a CR

    We already tried all the kbases from their website but to no avail. Any other ideas? I even used modules to find some dll missing but nothing. Thanks!
  17. jtammyg

    error 20997 when running an application that calls a CR

    Hi! when I click on the application and then select which report I want to run. The report seems to open but then it shows a blank page and an error message saying ERROR 20997:???? In other machines the report works fine, in this particular machine it used to work fine but no it doesn't...
  18. jtammyg

    substract one datetime field from another

    Is there any other way of doing this? Thanks!
  19. jtammyg

    substract one datetime field from another

    Hi! It gives an error that hours must be between 0 and 23. thanks!

Part and Inventory Search

Back
Top