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.
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...
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...
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.
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...
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...
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.
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.
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.)
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.
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.