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: *

  • Users: SDB15
  • Order by date
  1. SDB15

    Left Outer Join returning unwanted data

    This looks like a job for a UNION ALL. You can have multiple where clauses and still return one table (OVERLAP may also be useful depending on the desired results.
  2. SDB15

    need help with case syntax

    SET sometimes has issues when you don't put what you want in parens. Try enclosing the entire Case When in parens.
  3. SDB15

    Add a NewID using several columns to define distinct records

    Ran into some problems here is my code: select * into Republicans_2 from (select *, row_Number() over (partition by LName, FName, Addr1, City, Zip) as IdField from Republicans) X I get this message: "The ranking function "row_Number" must have an ORDER BY clause." And where do I specify...
  4. SDB15

    Add a NewID using several columns to define distinct records

    Got it. Thanks again for your help.
  5. SDB15

    Add a NewID using several columns to define distinct records

    That makes sense, thanks! Now how do I add more than one criteria to the partition?
  6. SDB15

    Add a NewID using several columns to define distinct records

    I have imported some data from excel spreadsheets where a person may pop up multiple times over the years of data I am working with. I want to assign an ID to them by using newid. How do I insert the new column and get SQL to assign the same ID to the same person even though there are different...
  7. SDB15

    Save Query Result as a New Table while using Union All

    Wow, that was a lot easier than I thought it would be. Thanks! What is the purpose of the 'x' at the end? I know it won't work without it but I've never seen that before.
  8. SDB15

    displaying data from linked server

    Not sure if this is what you're looking for but I've seen syntax using OpenRowSet that includes a username and even password.
  9. SDB15

    Save Query Result as a New Table while using Union All

    I'm taking data from several tables (unlinked) and using union all to combine it all into one massive table. The query runs perfectly now but I cannot save it to a new table because syntax requires into to be placed after SELECT but before FROM. Is there any way to do this using a stored...
  10. SDB15

    Crystal Generates a Bad SQL Query when connecting to a stored proc.

    I wrote a stored proceedure that selects the top 5 most run reports in our system. The query runs fine in SQL studio and if a co-worker logs in and puts it into a report, everything goes fine. (We are logging on to the same computer. Same version of crystal, etc.) When I try to select the stored...
  11. SDB15

    Server Login Prompt from Parameter field??

    The preview function has never worked correctly for me when I use dynamic pick lists. If you run them from an outside program they run great! Don't give up on em.
  12. SDB15

    Difference between left and right outer join

    This is just kind of a quirky thing about SQL: SQL likes to reorder your tables to a 'optimum' organization. Sometimes it changes your left outers to right outers because for some reason that is viewed as more efficient. In crystal I always use left outer joins for readablilty reasons.
  13. SDB15

    Time to Generate Special Field

    Tried the above:Its identical. Any other ideas?
  14. SDB15

    Time to Generate Special Field

    Yeah I want my users to see how fast the reports run.
  15. SDB15

    Time to Generate Special Field

    Does anyone know how to insert a field to show how quickly the report is run? Kind of like what you see on google (this page generated in .003 seconds, etc.)
  16. SDB15

    Parameter passing

    Make sure the parameter is referenced in your select statement otherwise there is no reason to prompt.
  17. SDB15

    Can someone please help me with this formula

    sorry, I missed something you need to say IF {INMAST.Commoditykey} IN ["RM","JS","LA","FD"] then color (0,145,27) Else True You are trying to pick out of an array. The computer took the entire entry "rm, js, la, fd" literally as all these must be met.
  18. SDB15

    Can someone please help me with this formula

    ELSE if {@Available} <{INLOC.Minimumstockqty} then color(250,0,0) What are you saying here? it looks like you havent assigned this case a value. I would just say: (IF {INMAST.Commoditykey} ="S" then color(0,0,250) ELSE IF {INMAST.Commoditykey} ="RM,JS,LA,FD" then color (0,145,27) Else True
  19. SDB15

    Dynamic Parameters based on Stored Proceedures

    Worked perfectly after I figured out how to match the parameters' data types in SQL. (turns out SQL dates are always DATETIME fields) Thanks!
  20. SDB15

    Picture shows Blank

    What format is the image in?

Part and Inventory Search

Back
Top