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 Chriss Miller 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: cwsstins
  • Content: Threads
  • Order by date
  1. cwsstins

    Get single row from TVF

    I got some help in another thread to create this table-valued function: CREATE FUNCTION dbo.GetAwdYrTbl () RETURNS @AwdYrTbl TABLE ( AwdYr VARCHAR(7) , YearID VARCHAR(2) , Nbr VARCHAR(1) ) BEGIN Declare @TodayYr VARCHAR (4) Declare @TodayMn VARCHAR (2) Declare...
  2. cwsstins

    Turn statement into View - table variable declare error

    I've got a query that works perfectly when run on its own and returns what I need it to. When I try to wrap it into a view as displayed below, I'm getting an error "Must declare the table variable "@AwdYrTbl" I'm sure this is some kind of syntax thing I'm doing wrong. How can I fix it? --...
  3. cwsstins

    Change ReadLine to include Mid in addition to Left

    I've got working code (thanks to help from this forum) that will write to a file the first 42 characters of each line in numerous files. Works like a charm. However, I now have a need to also write characters from 10 other areas of each line. For instance, in the code below, i need to modify...
  4. cwsstins

    VBS MoveFile results in error

    Trying to write a script to move files with last month's date in the filename to an archive folder that exists in the same folder. For instance: C:\_Temp_Delete\Daily Reports\Report 1 folder --> this is where the file initially resides C:\_Temp_Delete\Daily Reports\Report 1...
  5. cwsstins

    Search multiple folders for filename using wildcard

    I've been able to string together the basic code for what I want by searching TekTips and other sites. The code below will search a network share for a particular file and write the folder|filename to a text file. What I need is for it to search multiple directories that have a similar...
  6. cwsstins

    Insert multiple records with INSERT and CASE

    SQL Server 2005, trying to insert multiple records into table variable using one insert statement (no problem) and a CASE statement (problem). Here is a snippet: ... DECLARE @YrTbl TABLE (Yr VARCHAR(7)) SET @TodayMn = MONTH(getdate()) SET @TodayYr = YEAR(getdate()) SET @2Years =...
  7. cwsstins

    Get Multiple Values in One Field from Reference Tbl

    I've got a table that contains an error code field that can contain multiple error codes (001, 002, 003...) and it is joined to a reference table that contains the values of the codes and their corresponding descriptions: Tbl1 ErrorCode char(75) Tbl2 ErrorCode char(3) Descript char(1000) In...
  8. cwsstins

    Creating Crosstab with CASE

    I'm trying to produce a crosstab to move rows into columns using CASE statements. Trying to stay away from PIVOT because there are multiple columns I want to move and it looks like PIVOT will be too complex. Tables: Person, Schedule Schedule table has multiple records for one Person. I've got...
  9. cwsstins

    Group Sort on Sum Formula

    I have a SUMFormula that does a SUM(@OtherFormula1) + SUM(@OtherFormula2). I want to do a Group Sort using the SUMFormula, but it's not listed in the Group Sort Expert for my group. How can I sort on this thing? CR XI, SQL Server 2005.
  10. cwsstins

    Join 2 Tables via 3rd Table

    I am trying to get user and security group data from two different tables (users & secgroup). However there is no join between the two tables. There is a third table (secbygrp) that allows a one-to-many join from each of the first two tables. For instance: users.id secgroup.groupid secbygrp.id...
  11. cwsstins

    Problem with SP from CR

    I've got a CR (XI) calling a SP (SQL Server 2005) but returning no data. So I go to check out the (new, by the way) SP. It looks something like this: @Prm char AS SELECT tbl1.fld1, tbl2.fld1, tbl3.fld1, tbl1.fld2, tbl2.fld2, tbl3.fld2 FROM (TABL1 tbl1 INNER JOIN TABL2 tbl2 ON tbl1.fld1 =...
  12. cwsstins

    Pass Date Formula to SP

    I'm not a programmer, but I play on on TV. I've got a report (CR v11) that uses a formula to change string field to date (@Yesterday). Then selection formula that says {@Yesterday} = CurrentDate -1 The reports run against a SP, which looks like this: ALTER PROCEDURE [dbo].[_spNumbers]...
  13. cwsstins

    First-time as Contractor

    I have about 10 years of experience as an IT pro. I'm employed full-time/perm and, for the first time, I am looking to get some part-time telecommuting contract work. Have an offer on the table and I've submitted my proposed hourly rate based on my experience and FT salary. I've been upfront...
  14. cwsstins

    HTA Security Warning from MHT

    I've got an HTA that I would like to be able to run from a .mht file. This is for a prototype of an application that I would like to demo to my co-workers. All the files are local to my machine. However, when I attempt to run the HTA from the web browser, I'm still getting security warnings...
  15. cwsstins

    HTA to kill self and other HTA Processes

    I've got an HTA that offers the ability to open 3 other HTAs. On the "Close" button of the main HTA, I want all 4 HTAs to close. I'm using the code below, but the problem is when I run it, the main HTA closes right away, before it has a chance to close the 3 "child" HTAs, so they remain open. Is...
  16. cwsstins

    SQL Query in Formula

    Using CR 8.5 on Oracle 8.1 db. My table looks like this: LoginID FullName Mgr JONESB Bob Jones ROTHT SMITHJ Joe Smith ROTHT ROTHT Tim Roth KENTJ KENTJ Jim Kent KENTJ In my report, I'm grouping by FullName and trying to show each person's manager. But instead...
  17. cwsstins

    Sum of Data from Multiple Columns

    I've got an app with a Supply table and a Detail table. Detail table/screen has 6 different "Item" and "Quantity" fields, so you can order up to 6 items. Each item field can select any item from the Supply table. Supply.idno -> Detail.item1 ... Supply.idno -> Detail.item6 So from any Detail...
  18. cwsstins

    Tighten up Procedure

    I've got the following code running in a procedure, called by a KSH script. It does what it needs to do (delete dup records), but it takes a long time to complete. I realize there's some redundancy here, but I can't seem to get it to work any other way I've tried. I would appreciate help in...
  19. cwsstins

    Renumerate Row Sequence for PK

    I am inserting rows from one table into another table. The source table has no primary key. The destination table has a combo primary key on two columns...CallID and Seq. I've got data that looks like this in source table: CallID Seq col_x 123456 1 x... 123456 2 y... 123456 1...
  20. cwsstins

    Printer Setup Craziness

    v8.5...I'm having a problem with my printer setup options. I had to go in here yesterday to try to resolve another issue. Somehow I set up the default print options to print on Size 6x9 Envelope instead of 8.5x11 paper. Now every time I go into Printer Setup, I can change it to 8.5x11 and...

Part and Inventory Search

Back
Top