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. chrisdoesstuff

    delimited text runs together how can I separate it?

    Thanks for the formula. Currently the data isn't standardized to always be two names and not be McCarthy, O'Malley or Smith-Jones. I will be taking this and putting it in my file so if I do get standardized data like that I'll be able to work it out. Thank you again for your help!
  2. chrisdoesstuff

    delimited text runs together how can I separate it?

    I was hoping you wouldn't say that... I guess it's string replacement with my friend IF THEN ELSE.
  3. chrisdoesstuff

    delimited text runs together how can I separate it?

    Crystal X, SQL 2008 I have an app that sends data to the db as a pipe delimited varchar so when I query the db I get Jane Doe|John Doe|Mike Smith In crystal it displays as JaneDoeJohnDoeMikeSmith Is there a way I can make it Jane Doe John Doe Mike Smith or the more preferable Jane Doe, John...
  4. chrisdoesstuff

    What is the easiest way to select the Max of a field

    Thanks for your replies. I think Boris hit it on the head so I need to go work to apply that logic to my query.
  5. chrisdoesstuff

    What is the easiest way to select the Max of a field

    SQL server 2008 Maybe I'm missing something easy, at least it seems so but I have a datetime field that I need to select the max of. I was hoping I could do this as part of my join but it might be more work than that. The data is as follows Table: TeamTable Columns: Team_Name...
  6. chrisdoesstuff

    Question on inserting a single row multiple times based on its value

    What I want is to be able to select monkeys as column1 and cheetah as column2 so that I get one row per location but two potential values. I'd like to insert it into my table variable but I'm ok with querying the table twice to get the values. I was hoping that there is an easy way to...
  7. chrisdoesstuff

    Question on inserting a single row multiple times based on its value

    One or two depending on the data. It returns the values so if cheetah is there then it returns it and if monkey is present it returns that too. So it returns the location twice and the value once per animal.
  8. chrisdoesstuff

    learning stored procedures

    If you're looking for sample data to go with it you can download adventureworks from Microsoft http://msftdbprodsamples.codeplex.com/
  9. chrisdoesstuff

    Question on inserting a single row multiple times based on its value

    SQL express 2008 My data contains a set of values that I'd like to use parts of in a query. (this isn't real data I'm just trying to fully grasp the concept) Ex animals.value and the values are 'Rhino', 'Leopard', 'Cheetah', 'Monkey' I want to insert the data into a table variable but only if...
  10. chrisdoesstuff

    help with a parameter and variable

    I knew it was something simple but that really explains everything. It wasn't being treated like a variable it was being treated as data. I really appreciate your assistance! Again thank you very much.
  11. chrisdoesstuff

    help with a parameter and variable

    Thank you very much! WHERE descriptivename Like '%' + @icd91 + '%' worked perfectly as did your example. Can you explain why it doesn't work when I use '%@icd91%' and does when I concatenate the wild cards to my parameter?
  12. chrisdoesstuff

    help with a parameter and variable

    SQL server express 2008. I know I'm not doing something correct to pass the parameter to the query but I'm not positive what I'm doing wrong so hopefully you can help me. ALTER procedure [dbo].[Shortname2] @icd91 NVARCHAR (55) AS BEGIN DECLARE @icd92 NVARCHAR (55) SET NOCOUNT ON...
  13. chrisdoesstuff

    Create a group based on values

    If I cast the string using a formula such as IF assessment.value = "dog1" then "1" Else IF assessment.value ="cat" else assessment.value Could I then put that formula into a group and sort based on it?
  14. chrisdoesstuff

    Create a group based on values

    Crystal 10 SQL 2005 I need to create some groups based upon values. For example I have the items grouped by values now I need to take the values in the group and put them into another group. they are grouped because the duplicated values need to be removed. Groups would be: Dog1 Cat1 Fish1...
  15. chrisdoesstuff

    2 questions- dynamic page footers and creating a group for formatting

    Ok I tried to create the group but it won't let me create the group. I assume that is because the data for grouping wouldn't exist until after it had run. Do you have any other suggestions for creating this group? Crystal 10.
  16. chrisdoesstuff

    2 questions- dynamic page footers and creating a group for formatting

    Thanks for your help and feedback. I'll give the group a try as it seems promising. For the other options I just used if pagenumber <> 1 then true else if pagenumber = totalpagecount -1 then true else false type logic to get the footers to display when I wanted them. Again thank you for your...
  17. chrisdoesstuff

    2 questions- dynamic page footers and creating a group for formatting

    I have two questions: 1. Can I create a formula for a page footer to display when it is not the second to last or last page in the report. I assume I can use the page n of m special field and calculate based on that but I'm not sure how to do that. 2. I have grouped my items based on a...
  18. chrisdoesstuff

    Question on aliasing a column based on a value

    Thanks for the help unfortunately whoever upgraded this db from 2000 to 2005 did not upgrade the compatibility so I am getting an error. Is there an reasonably elegant way to pull this off in SQL2000?
  19. chrisdoesstuff

    Question on aliasing a column based on a value

    Thanks for the input. I'm trying to wrap my head around Pivot. Markros I'm going to take a shot with your code and I'll let you know what happens soon. Thank you again for your help.
  20. chrisdoesstuff

    Question on aliasing a column based on a value

    I am trying to write a query that will end up on a crystal report. SQL 2005 and this will be part of a stored procedure. I have a basically 1 table that contains two rows which have all my information in them but I need to be able to alias the column based on the values contained in a way...

Part and Inventory Search

Back
Top