... with Person_Projects as ( select 1 PersonID, 12 ProjectID from dual union all select 1 PersonID, 15 ProjectID from dual union all select 2 PersonID, 12...
... Recent versions of Oracle allow... with cash_accts as ( select 'USD00001' acct_no from dual union all select 'USD00002' acct_no from dual union all select...
Hi... Can anyone tell me how to find age between two dates? soppose 1st date is 02-apr-90 and 2nd date is sysdate...then how to find age between sysdate and...
Or even DATEDIFF()... ;) Yes, it is about the end of summer term... But really, didn't you learn in college that 'only when everything else fails, look in the...
Fall term at all the colleges 'round herah. This looks like a SQL Server II early in the term question. First quiz is coming up. John Warner ... fails, look ...
John Warner
john@...
Sep 3, 2008 5:58 pm
3712
Does anyone know a quick and dirty way to calculate a PERCENTAGE value within a range of two columns. For example. Value 2800 25% percentile 1400 50%...
Examples are here as well as an explanation - http://msdn.microsoft.com/en-us/library/ms189794.aspx _____ From: SQLQueriesNoCode@yahoogroups.com ...
Rob
rc@...
Sep 3, 2008 11:34 pm
3714
Hello and thanks for the opportunity to seek help with a task I have been charged to perform. I am not a student. I have already accomplished this task using...
it's also one way to find age select datepart(year,getdate())-(1984) as years,datepart(mm,getdate ())-(04) as months,datepart(dd,getdate())-(02) as days u...
I think its better to do this with procedural language code coz it gives you much more flexibility and would perform a lot better than a SQL query, even if you...
Don; I have expanded your sample list a little to make sure I covered your rules for selecting the results. I have also included ways to query for your...
... 43sec ... <snip> With analytical functions in Oracle you can start with... with src as ( select null id, null event, null tm from dual where 0=1 union all ...
Hi All, I have a table with a field say username which is a char field (to accomadate values like 1, 11nml, 3 and also abc12, xyz456 etc.). Since username is...
IF alphanumeric values AWAYS start with a alpha character, you could try: WHERE MyColumn >= 'a' Regards, Arnie Rowland, MVP (SQL Server) "I am a great believer...
I would recommend using PATINDEX. SELECT username FROM usernametable WHERE PATINDEX('%[0-9]%', username) > 0 AND PATINDEX('%[A-Za-z]%', username) > 0 PATINDEX...
Use PATINDEX http://msdn.microsoft.com/en-us/library/ms188395.aspx SELECT * FROM MyTable WHERE PATINDEX('%[^0-9]%', MyColumn) > 0 AND PATINDEX('%[^a-zA-Z]%',...
Mike Lau
mlau@...
Sep 10, 2008 4:40 pm
3723
Here's one way: SELECT * from mytable WHERE ASCII(myfield) between 65 and 90 This will exclude records where the first character of myfield is NOT between A...
Thanks for ur reply I am working on ORACLE9i. but this query not executed it shows the error "ORA-00904: "PATINDEX" : invalid identifier. Let me know the...
Hello, I am a beginner SQL learner. I not sure where to add a count statement in a existing SQL code. The code is below. So I can understand how to do this....
I would like to count the Student Number. What I am try to do is count how many times the student is repeated. For example is the student shows up twice in...
OK, didn't really read your code. This likely is not getting all the data you want as I don't have your tables and constraints. Give this a shot and let's hear...
John Warner
john@...
Sep 11, 2008 3:09 pm
3730
I tried the code. I am using Aqua Data Studio for the query. The Error I get when I run the ... ORA-00923: FROM keyword not found where expected Just so...
Oh, this is Oracle. That little bit of information helps. Run this is SQL Plus and shoot back the errors, also delete the -- line as the is an SQL Server...
John Warner
john@...
Sep 11, 2008 3:29 pm
3732
Hey guys I just wanted to take a moment out and share this with all of you. http://www.caldavid.com/911/911.swf Share a smile and a kind word or helping hand...