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 strongm 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: ghbeers
  • Content: Threads
  • Order by date
  1. ghbeers

    Trying to get a select statement to behave

    I have a table XYZ which looks something like: ID POS DO_THESE INQUIRY_ONLY -- --- -------- ------------ AX 1 A A AX 2 B C AX 3 C E AX 4 D AX 5 E AZ 1 U V AZ 2 V AZ 3 W ... I have a list statement with several columns like ID, NAME, DO_THESE, INQUIRY, ETC So for the MAINT Column, I...
  2. ghbeers

    I'm creating a stored procedure. I

    I'm creating a stored procedure. I have declared some @tables, and some @variables to handle variable years that are entered by the user. eg. @FAYEAR1 = <2013>, @FAYEAR2 = <2014>, etc. These years will be used for variable file suite table name that are TA_YYYY. Then I have temp table...
  3. ghbeers

    Stuck on getting only first valid record from associated table

    I am absolutely stuck on finding ONLY 1 record that exists in an associated table that meets my minimum requirement. I have a table STUDENT_TERMS that is for a student and specific term. In the table are keys to all of the course info the student has signed up for the semester. When I go to...
  4. ghbeers

    Is there a way I can pull data from

    Is there a way I can pull data from tables like those in the attached to align in the preferred manner? The 3rd party app that's pulling the results in can seem to take care of it. Any ideas?
  5. ghbeers

    Using the below tables and the logi

    Using the below tables and the logic in the pseudo code, In my SQL query I'm having trouble getting the correct date value when the A.STUDENT is NOT in the LATEST_DATE table. In my query I have the LATEST_DATE table in a left join, and using OR conditions, but it's not correctly getting the...
  6. ghbeers

    Subquery question

    I'm trying NOT to create a temp table to do what I need because my 3rd party reporting software will require a stored procedure, and yet the 3rd party software has a bug preventing me to do so. So, I was hoping to be able to do something like you see below. Is this possible? I'm definitely...
  7. ghbeers

    Getting error &quot;Each GROUP BY expression must contain at least ...&quot;

    I don't understand why I'm getting the error "Each GROUP BY expression must contain at least one column that is not an outer reference" because I really do not understand what it means. Can someone help me understand its true meaning? I have a temp which is driving the selection. It is...
  8. ghbeers

    I have a 3 part key that look like:

    I have a 3 part key that look like: 1234567*AWD*2017/FA 1234345*AWD2*2017/FA 1234555*BDD09*2017/FA I'm having trouble pulling only the middle value between the 2 delimiters (*) into my report. After trying all sorts of methods, it keeps including the trailing *. When I tried using the first 4...
  9. ghbeers

    I have a query that's basically lik

    I have a query that's basically like and the output looks like what follows it. I can get the 3rd party reporting tool in which I place the sql script to take care of everything but what you see for the repeating of the statuses and catalog years. Is there a way to make these columns...
  10. ghbeers

    Using single user entered attribute in where to match one of 4 different columns

    I have a report that is generated from a table that looks like id name etc. FA_SCHOLARSHIP WI_SCHOLARSHIP SP_SCHOLARSHIP SU_SCHOLARSHIP Where zero or more of the 4 scholarship columns will contain "Y" I want the user to enter FA, WI, SP OR SU into a single prompt. So if they enter "FA" I...
  11. ghbeers

    What is the Return value coming from stored procedure

    I have a stored procedure (see sample below) that is a report. It runs correctly, but it always has an additional piece of output. Return Value of zero. (See attachment). When I put this stored procedure into a Entrinsik Informer reporting tool, it's not liking that return value. Is there...
  12. ghbeers

    Declaring a date with a format for prompting

    I have the below stored procedure to which I want to add a date variable (@LAST_DTE) with a format of 'mm/dd/yy'. These @variables are user prompts and I want the user to enter the date in this format. What is the proper way to format this declared @variable? Thank you. USE [TmsEPly] GO...
  13. ghbeers

    Formatting created in Infomaker report not appearing when rows are downloaded

    I've added the currency formatting to 2 columns in my Infomaker report, but when I save the rows with headers to any file type, including .csv and excel, the formatting is not there. What am I doing wrong? I am using a SQL stored procedure for this report.
  14. ghbeers

    SQL subquery within an outer join

    I'm having a hard time getting joins to communicate with each other when I have a subquery in one of them. For example I have the below query and I need the term in the 2nd outer join to equal the term prompted for in the first join. And of course, the subquery doesn't see the prompted for...
  15. ghbeers

    Creating a sql stored procedure which contains temporary tables

    I've never created a stored procedure with temp tables in the past. I need to do this now because my query contains a temp table and must be in a stored procedure. Please help. Query is below. I have another query I also need to place in a stored procedure that has multiple temp tables. I...
  16. ghbeers

    using a function created list as a SQL IN list

    I have a list of keys in a function (XTSTSEC) that I create in order to prevent duplicate rows from being reported. These keys are dependent on a course. So I would like to have something like this work, but it does not. select * from COURSE_SECTIONS CS, COURSE_SECTIONS_LS CSL where...
  17. ghbeers

    Getting first row by employee for latest date

    Although I am using what I thought was the correct syntax, I am getting an error. I have a table like emp id status date time An employee can have multiple records. I want the status of the latest date and time. But ordering this by descending date and time is throwing an error...
  18. ghbeers

    Viewing form through portal messing up .css formatting

    I have a .css file that is linked to a form that is built by system software which generates the html code. There are tables, etc. in the display. It looks great when viewing it directly through the web interface. However, when I go through the institution's portal, my formatting is...
  19. ghbeers

    Problem using &quot;data-only&quot; excel option

    Business Objects users are accessing a crystal report I created, and are having a problem when downloading the results to Excel using the data-only option. One of the columns of data is shifting to the left, although the column headers are not shifting. But when I download it using the plain...
  20. ghbeers

    Putting a condition on an column in SQL query

    I want the field PP.POSPAY_SALARY_MIN modified depending on the value in P.POS_HRLY_OR_SLRY. Not sure the best way to do this. select distinct ... P.POS_HRLY_OR_SLRY, PP.POSPAY_SALARY_MIN, ... So the logic would be if P.POS_HRLY_OR_SLRY = 'S' then...

Part and Inventory Search

Back
Top