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 Mike Lewis 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. tmccoy1

    SQL Command join to external server/database

    Crystal reports version is 2008. Errors encountered when attempting to add sql command: 1. With brackets around linked server name: [TIMMY\TIMMY].LIHP.dbo.table_name Failed to retrieve data from the database. Details: 42000[Cache ODBC][State: 37000][Native Code 1] …[Location: <Prepare>]...
  2. tmccoy1

    SQL Command join to external server/database

    Anyone have any tips for the correct syntax to use in the SQL command to join a table from an external server and database? This works in a straight sql query with brackets around the server name, but Crystal rejects that with an error. It also works to manually select the tables from each...
  3. tmccoy1

    Variable Parameter using SQL wildcard

    My report is based on an SQL command that sets variables based on a CASE statement based on a parameter select. It then uses the variables to populate part of the where clause to select records. Example: Set @var = CASE WHEN {?param} = 1 THEN '[^SUB]%' Select….. From… Where tbl.field LIKE...
  4. tmccoy1

    Conditional html formatting on a field in a formula

    This works on static text, but when using an actual field it just prints the field name on the report, bolded and in red. Any suggestions on fixing this in Crystal Reports 2008? IF {field_code} = 'Y' THEN "<html> <font color = red> <b> {field_value} </b> </font> </html>" ELSE {field_value}...
  5. tmccoy1

    Query results faster for larger criteria range

    Thanks. That is likely the cause. The query returns NULL NULL on all of the tables. I don't have admin access here and would have to take this up with the DBA, but this is also a data warehouse copy of an Intersystems Cache database, and I guess there may be some reason it is this way. I'll...
  6. tmccoy1

    Query results faster for larger criteria range

    I have a SQL Server 2008 query that runs by a date range for transactions. If I limit the date range to a period of 5 days or less, the query takes almost 2 full minutes to execute. However, if I set the date range for over 5 days, even for a period of several months, the results come back...
  7. tmccoy1

    Subreport and Link Parameters

    Thank you pmax9999. Your suggestion lead me to a solution that seems to work well. I found a post on another site that was an elaboration on your suggestion, and if it is of any help to anyone else it is: "I've done this before. Took me a while to figure out how to get parameters into an SQL...
  8. tmccoy1

    Subreport and Link Parameters

    I have a report that typically pulls a small amount of data per instance since it is run per client ID. The main reports runs very quickly. When adding a needed subreport the report then takes a long time and appears to cycle through the entire database, rather than being narrowed by the...
  9. tmccoy1

    Exists subquery - missing results

    I found a solution. In the exists clause I had to change the reference to the initial select from the pmt_2B table to the chrg_2B table.
  10. tmccoy1

    Exists subquery - missing results

    I would greatly appreciate extra eyes to try to solve this issue. The EXISTS subquery is eliminating a row(s) of data that it should not. The first part of the query, prior to the EXISTS subquery returns the record in question, and a separate query on the table used in the EXISTS subquery...
  11. tmccoy1

    SQL structure rejected by Crystal

    Nevermind. Found the issue. It was further down in my code in a union of the same tables and fields where I missed changing the alias from a copy/paste. DOAH!
  12. tmccoy1

    SQL structure rejected by Crystal

    My SQL query runs fine in SQL management studio, but when pasting it into an SQL command in Crystal it is rejected with " HIST ...label is not among the applicable tables". Any pointers appreciated. here is the SQL Select chrg.field1, hist.field2, etc. FROM billing_tx_charge_detail AS chrg...
  13. tmccoy1

    Assistance with Replace

    Thank you. That is exactly what it was doing. It turns out that the prog_val field contained a concatenated value of the code and the value.
  14. tmccoy1

    Assistance with Replace

    I am modifying a report that uses a formula for a grouping and would appreciate any advise/explanation that anyone might offer. The formula is: REPLACE(TRIM(REPLACE({tbl.prog_val},{tbl.prog_code},'')),'/','-') I am new to the REPLACE function, but I believe that I follow its functionality in...

Part and Inventory Search

Back
Top