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

    Query to select from two tables with linear output

    I'm looking at another forum post where the OP wants to list the contents from two tables in a linear fashion. The only response so far is the application should handle it and not do it in a query. I agree with that but thought I would try it myself anyway. I'm not getting anywhere on it...
  2. TysonLPrice

    Flatten rows in a join

    I have a stored procedure that currently brings back one row per policy number. A new table has been introduced that needs to be joined to that stored procedure. That table currently has six entries per policy but that can increase or decrease. This is sort of what I am looking at. Although...
  3. TysonLPrice

    Help with SPROC performance

    I inherited this ugly beast...I'm wondering if someone can see anything obvious to speed it up. For example I changed the "Case select count > 0" part to check where exists select top 1. That made it worse and I backed it off. I took the order by out and tried to sort it in the application...
  4. TysonLPrice

    Help with grouping query

    I always have trouble with this kind of query. I'm trying to count the number of occurences of a column with a given value in a range. The data is: create table ##Steve(Year varchar(4),flag char(1)) insert into ##Steve(year,flag) values('2000','A') insert into ##Steve(year,flag)...
  5. TysonLPrice

    File dialog does not open

    VB 6.0 and Crystal 8.5 Just a couple of our users try and export a Crystal report to a PDF and the file dialog does not appear. From Google I saw registering FileDialog.dll from the crystal folder but the user community doesn't have that where I can find it. I don't think the is a VB...
  6. TysonLPrice

    replication problem - upgrading

    I'm posting this for a fellow worker. Upgrading Server Hardware and changing from Default Instance of SQL Server 2005 Standard 32bit on Windows 2003 32 bit to New Server Hardware with Named Instance of SQL Server 2005 Standard 64bit on Windows 2008 R2 . I built the new server, created the...
  7. TysonLPrice

    Using 'Where in' in selection formula

    I'm trying to change a 8.5 Crystal report run from VB 6.0 to use multiple columns in a where clause. Current it uses: rptExceptionsByGroupID;1.RejectionReason} = 'Bwc 100% Emr Cap-Groupable in a string called strSelectionFormula like this: .SelectionFormula = strSelectionFormula I'm trying...
  8. TysonLPrice

    Word document file prefix

    We feed a word document to a third party printer device and the file name is being prefixed with "Microsoft Word" as part of the file name and the software can't find it. For example Test.txt gets changed to "Word Document test.txt." I'm pretty sure it is a Word 2007 thing but I can't find it...
  9. TysonLPrice

    Align listview

    I seem to be having trouble finding out how to right align the text in listview columns. We have common listview control at my shop and I need to align it at run time. Currently dollar values are left aligned. Alignment. doesn't have right as an option.
  10. TysonLPrice

    Sargable question

    I've been pointed to several links for here and this explanation: This confuses me: Set SHOWPLAN_ALL On go select * from claim where bwcclaimnum like '9701301834%' select * from claim where bwcclaimnum = '9701301834' go Set SHOWPLAN_ALL Off bwcclaimnum is a non-unique non clustered index...
  11. TysonLPrice

    Sub select anomaly

    Not really a question. I made a mistake on a column in a sub select and was surprised the compiler didn't catch it. Seems like a bug to me. At the very least I wouldn't think the second select would bring back anything rather then all the rows. create table #Select(SSN Varchar(10)) create...
  12. TysonLPrice

    OPENROWSET with parameter

    I trying to set something up to capture the output of a stored procedure without creating the temp table first. OPENROWSET does it but it doesn't accept parameters. Trying to use dynamic SQL I get the error: "Cannot process the object " SET FMTONLY OFF EXEC cs_GetClaim 111144550". The OLE DB...
  13. TysonLPrice

    Fun with SQL

    Hoping this wasn't done on company time :-) http://www.simple-talk.com/sql/t-sql-programming/minesweeper-in-t-sql/
  14. TysonLPrice

    Update table using joins

    I'm having trouble putting together an update. The query to select the data is: [code]select c.coordinator, x.coordinator from ##Xref x, Claim c (nolock) join iwlocation (nolock) on fkiwlocation = pkiwlocation join injuredworker iw (nolock) on fkinjuredworker = pkinjuredworker where...
  15. TysonLPrice

    Select text length

    I posted this once and got a response and made note of it. I can't find it. I need to find out the lengths of a text field for a conversion. This generates an error: select len(injurydescr) 'ctr' from claim where fkemployeraddress = 47556 order by ctr desc Server: Msg 8116, Level 16, State...
  16. TysonLPrice

    Can't remember the term

    I've seen postings on and am trying to research tuning stored procedures by using what I thought was called scalibility in where clauses. I can't remember an exact scenario but it's something like if you use '01/01/2010' versus GetDate(). It's along the lines that the compiler doesn't know...
  17. TysonLPrice

    DB roles query

    SQL 2005 I’m an application programmer not a DBA and I’m working on a program to list all the database roles for a selected user and users in roles. I got this from Google for a user’s DB roles and I think it works: DECLARE @username NVARCHAR(128); SET @username = 'TPrice'; WITH CTE_Roles...
  18. TysonLPrice

    New table/design question

    I’m a programmer with just a smattering of SQL database background which is mainly accessing the predesigned databases. I’m changing an application which involves adding a new table and relationship. It’s basically this: There is a single table in currently in place that contains information...
  19. TysonLPrice

    Count lines of code

    Does anyone know of a way to count the lines of code in Views, Functions, and SPs in a database? I did our VB 6.0 projects and was able to skip comments and blank lines. Before anyone asks why :-) It came down from coporate…
  20. TysonLPrice

    Crystal subreport unknown

    I only have a rudimentary background with Crystal Reports 8.5 but do have some support responsibilities with them via Visual Basic 6.0. I copied a production report to my C: drive to make changes and when I point at it in the VB program I get an error message that a subreport cannot be found...

Part and Inventory Search

Back
Top