Search Results

Search found 21742 results on 870 pages for 'unique values'.

Page 1/870 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Should I specify both INDEX and UNIQUE INDEX?

    - by Matt Huggins
    On one of my PostgreSQL tables, I have a set of two fields that will be defined as being unique in the table, but will also both be used together when selecting data. Given this, do I only need to define a UNIQUE INDEX, or should I specify an INDEX in addition to the UNIQUE INDEX? This? CREATE UNIQUE INDEX mytable_col1_col2_idx ON mytable (col1, col2); Or this? CREATE UNIQUE INDEX mytable_col1_col2_uidx ON mytable (col1, col2); CREATE INDEX mytable_col1_col2_idx ON mytable (col1, col2);

    Read the article

  • Hash of unique value = unique hash?

    - by Nebs
    Theoretically does hashing a unique value yield a unique value? Let's say I have a DB table with 2 columns: id and code. id is an auto-incrementing int and code is a varchar. If I do ... $code = sha1($id); ... and then store $code into the same row as $id. Will my code column be unique as well? What about if I append the current time? eg: $code = sha1($id . time()); Thanks.

    Read the article

  • Unique Business Value vs. Unique IT

    - by barry.perkins
    When the age of computing started, technology was new, exciting, full of potential and had a long way to grow. Vendor architectures were proprietary, and limited in function at first, growing in capability and complexity over time. There were few if any "standards", let alone "open standards" and the concepts of "open systems", and "open architectures" were far in the future. Companies employed intelligent, talented and creative people to implement the best possible solutions for their company. At first, those solutions were "unique" to each company. As time progressed, standards emerged, companies shared knowledge, business capability supplied by technology grew, and companies continued to expand their use of technology. Taking advantage of change required companies to struggle through periodic "revolutionary" change cycles, struggling through costly changes that were fraught with risk, resulted in solutions with an increasingly shorter half-life, and frequently required altering existing business processes and retraining employees and partner businesses. The pace of technological invention and implementation grew at an ever increasing rate, making the "revolutionary" approach based upon "proprietary" or "closed" architectures or technologies no longer viable. Concurrent with the advancement of technology, the rate of change in business increased, leading us to the incredibly fast paced, highly charged, and competitive global economy that we have today, where the most successful companies are companies that are good at implementing, leveraging and exploiting change. Fast forward to today, a world where dramatic changes in business and technology happen continually, a world where "evolutionary" change is crucial. Companies can no longer afford to build "unique IT", nor can they afford regular intervals of "revolutionary" change, with the associated costs and risks. Human ingenuity was once again up to the task, turning technology into a platform supporting business through evolutionary change, by employing "open": open standards; open systems; open architectures; and open solutions. Employing "open", enables companies to implement systems based upon technology, capability and standards that will evolve over time, providing a solid platform upon which a company can drive business needs, requirements, functions, and processes down into the technology, rather than exposing technology to the business, allowing companies to focus on providing "unique business value" rather than "unique IT". The big question! Does moving from "older" technology that no longer meets the needs of today's business, to new "open" technology require yet another "revolutionary change"? A "revolutionary" change with a short half-life, camouflaging reality with great marketing? The answer is "perhaps". With the endless options available to choose from, it is entirely possible to implement a solution that may work well today, but in 5 years time will become yet another albatross for the company to bear. Some solutions may look good today, solving a budget challenge by reducing cost, or solving a specific tactical challenge, but result in highly complex environments, that may be difficult to manage and maintain and limit the future potential of your business. Put differently, some solutions might push today's challenge into the future, resulting in a more complex and expensive solution. There is no such thing as a "1 size fits all" IT solution for business. If all companies implemented business solutions based upon technology that required, or forced the same business processes across all businesses in an industry, it would be extremely difficult to show competitive advantage through "unique business value". It would be equally difficult to "evolve" to meet or exceed business needs and keep up with today's rapid pace of change. How does one ensure that they do not jump from one trap directly into another? Or to put it positively, there are solutions available today that can address these challenges and issues. How does one ensure that the buying decision of today will serve the business well for years into the future? Intelligent & Informed decisions - "buying right" In a previous blog entry, we discussed the value of linking tactical to strategic The key is driving the focus to what is best for your business, handling today's tactical issues while also aligning with a roadmap/strategy that is tightly aligned with your strategic business objectives. When considering the plethora of possible options that provide various approaches to solving today's complex business problems, it is extremely important to ensure that vendors supplying those options, focus on what is best for your business, supplying sufficient information, providing adequate answers to questions, addressing challenges, issues, concerns and objections honestly and openly, and focus on supplying solutions that are tailored for, and deliver the most business value possible for your business. Here are a few questions to consider relative to the proposed options that should help ensure that today's solution doesn't become tomorrow's problem. Do the proposed solutions: Solve the problem(s) you are trying to address? Provide a solid foundation upon which to grow/enhance your business? Provide tactical gains that align with and enable your strategic business goals/objectives? Provide an infrastructure that can be leveraged with subsequent projects? Solve problems for the business overall, the lines of business, or just IT? Simplify your current environment Provide the basis for business: Efficiency Agility Clarity governance, risk, compliance real time business visibility and trend analysis Does your IT staff have the knowledge/experience to successfully manage the proposed systems once they are deployed in production? Done well, you will be presented with options tailored to your business, that enable you to drive the "unique business value" necessary to help your business stand out from others, creating a distinct competitive advantage, delivering what your customers need, when they need it, so you can attract new customers, new business, and grow top line revenue, all at a cost that provides a strong Return on Investment/Return on Assets. The net result is growth with managed cost providing significantly improved profit margin and shareholder value.

    Read the article

  • SQL Server giving a weird conversion error

    - by codingguy3000
    Hello Everyone I'm stuck and any help you can give me is greatly appreciated. create table stackoverflow_rules(myguid uniqueidentifier primary key, myvarchar50 varchar(50)) insert into stackoverflow_rules(myguid, myvarchar50) values('27C4CF31-2C4C-4C78-BBDC-2D0FDAA891CF','9985276') insert into stackoverflow_rules(myguid, myvarchar50) values('6F865BBD-1D79-4931-BCFE-71AD7A14B145','9985275') insert into stackoverflow_rules(myguid, myvarchar50) values('C91124D9-CE83-44C6-A979-427858BBCDCE','9985274') insert into stackoverflow_rules(myguid, myvarchar50) values('18D89F3C-D15D-4A27-9695-CE4417A9D752','9985273') insert into stackoverflow_rules(myguid, myvarchar50) values('40C9A127-D50D-440C-A6BF-A3C292B56121','9985272') insert into stackoverflow_rules(myguid, myvarchar50) values('3191CE74-6443-4DF0-ABFB-4083150E27A7','9985271') insert into stackoverflow_rules(myguid, myvarchar50) values('489606B3-8EE8-4308-BD3B-660FEC999B84','9985270') insert into stackoverflow_rules(myguid, myvarchar50) values('7FB986D6-7ACF-4453-B124-E688514D3A84','9985269') insert into stackoverflow_rules(myguid, myvarchar50) values('2E1662CB-FBC2-418A-9FFD-453895EE6FA4','9985268') insert into stackoverflow_rules(myguid, myvarchar50) values('6180E683-AA19-4B5D-9AA1-370B9AA8C156','9985267') insert into stackoverflow_rules(myguid, myvarchar50) values('39BDD429-4C49-4351-951F-016B89E700D0','9985267') insert into stackoverflow_rules(myguid, myvarchar50) values('9A09CF26-B168-48D2-9178-EBBD6C0BA5F4','9985267') insert into stackoverflow_rules(myguid, myvarchar50) values('56BA06A7-71F6-4AC2-817A-69A3E800BE54','9985266') insert into stackoverflow_rules(myguid, myvarchar50) values('35D8C2FE-4793-40BC-AECA-10AA722866AE','9985265') insert into stackoverflow_rules(myguid, myvarchar50) values('84162588-D2A2-4B67-869D-2D7A0CB3ABEC','9985264') insert into stackoverflow_rules(myguid, myvarchar50) values('05A8BE08-B0CF-4ADC-A901-2DB6B70713DA','9985263') insert into stackoverflow_rules(myguid, myvarchar50) values('11E1B3F5-5EC0-43BF-B868-B30BCC5F97B3','9985262') insert into stackoverflow_rules(myguid, myvarchar50) values('D48875E9-4A2B-4A5E-8C3A-6788ADD2E44E','9985261') insert into stackoverflow_rules(myguid, myvarchar50) values('5C29D799-5F86-4B5D-8B31-1AFB9E289417','9985260') insert into stackoverflow_rules(myguid, myvarchar50) values('3FAF4D60-F06A-4754-A26F-61DE6A121E9E','9985259') insert into stackoverflow_rules(myguid, myvarchar50) values('4F001BF6-BF60-4F40-AAE1-32CD707E87F8','9985258') insert into stackoverflow_rules(myguid, myvarchar50) values('56A91F39-F9D2-438C-A424-F26ED799F723','9985258') insert into stackoverflow_rules(myguid, myvarchar50) values('F55F72CA-0C2B-4DE7-B725-C9521CD57B23','9985257') insert into stackoverflow_rules(myguid, myvarchar50) values('364808A7-46E6-4639-A14D-6A350A56D2A0','9985256') insert into stackoverflow_rules(myguid, myvarchar50) values('68FA5B18-BBE3-4F1F-A9DE-D46853AD5D4A','9985255') insert into stackoverflow_rules(myguid, myvarchar50) values('B0118D37-807A-4D29-9B56-790F3D810C64','9985254') insert into stackoverflow_rules(myguid, myvarchar50) values('E998F33E-F05A-4C49-8CC2-B90BCFA9AE0E','9985253') insert into stackoverflow_rules(myguid, myvarchar50) values('A0531477-335C-4A7D-A1E7-1DAD54ECB7AD','9985252') insert into stackoverflow_rules(myguid, myvarchar50) values('96540D09-BA49-413B-9FD6-228DF524BE1A','9985251') insert into stackoverflow_rules(myguid, myvarchar50) values('23CD3C18-DAE2-463B-B27C-977488DF9C5F','9985251') insert into stackoverflow_rules(myguid, myvarchar50) values('8BF4AE7D-0AF0-47F9-9388-A2D4CA4C3160','9985250') insert into stackoverflow_rules(myguid, myvarchar50) values('E1892F4D-471C-4A49-8D68-F9F1E6E9C275','9985249') insert into stackoverflow_rules(myguid, myvarchar50) values('641A62CC-1DEE-4DFD-BC9A-DD47D7C45B18','9985248') insert into stackoverflow_rules(myguid, myvarchar50) values('3AF2F7CA-489D-4A79-A6F5-DB5578F381D0','9985247') insert into stackoverflow_rules(myguid, myvarchar50) values('939B3773-BE13-483C-A27F-5594A23AB6F2','9985247') insert into stackoverflow_rules(myguid, myvarchar50) values('81A5FD90-1E2D-4DB5-A10F-5624A576D566','9985247') insert into stackoverflow_rules(myguid, myvarchar50) values('E87109DD-7283-4B60-AB7F-F9A3DD384E52','9985247') insert into stackoverflow_rules(myguid, myvarchar50) values('689A789F-0FFC-45AE-87DF-66C5130338E2','9985246') insert into stackoverflow_rules(myguid, myvarchar50) values('4A9D3A2D-940B-4D45-8234-A1C98FF8A2FB','9985246') insert into stackoverflow_rules(myguid, myvarchar50) values('75073565-E623-40FC-AEF3-81620F2514A8','9985245') insert into stackoverflow_rules(myguid, myvarchar50) values('DB583FF8-1635-47C1-8241-D37C015C7642','9985244') insert into stackoverflow_rules(myguid, myvarchar50) values('39EA148B-55D1-4878-925A-39FA8592F451','9985243') insert into stackoverflow_rules(myguid, myvarchar50) values('BF1CE2D7-ABD3-460B-A7DC-BD0E2B2A5388','9985242') insert into stackoverflow_rules(myguid, myvarchar50) values('B6431717-26F0-436E-9DCC-C0C5240AC329','9985242') insert into stackoverflow_rules(myguid, myvarchar50) values('4F22E672-6F3D-454C-ABA7-D9B84D12DDE0','9985241') insert into stackoverflow_rules(myguid, myvarchar50) values('0436E893-DC43-4FF7-8BDC-BD0BF9E9A55D','9985240') insert into stackoverflow_rules(myguid, myvarchar50) values('60B2FE73-3575-4047-B324-63620FEACD6B','9985239') insert into stackoverflow_rules(myguid, myvarchar50) values('2041E1E5-F60F-4494-A000-F349F49662EC','9985238') insert into stackoverflow_rules(myguid, myvarchar50) values('B89636C8-4648-4058-8DC6-95DCE468CA63','9985237') insert into stackoverflow_rules(myguid, myvarchar50) values('4EC1B486-1E9C-4B41-94C1-5B24471BAD3D','9985236') insert into stackoverflow_rules(myguid, myvarchar50) values('4C86120E-1A27-4F59-948B-F11D8ACD498E','9985234') insert into stackoverflow_rules(myguid, myvarchar50) values('E8A1EA7A-5337-4769-9D23-25F7BFB589AF','9985217') insert into stackoverflow_rules(myguid, myvarchar50) values('6E7982F0-5899-4214-A05A-262E05A540CB','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('C55B838F-FD63-40E9-97AF-25E02A37ABB7','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('95296596-ED86-4A88-8C46-27CF79D4AFB9','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('149BC6CC-857C-4CD7-B374-29EE6382CFCF','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('5D3E88FC-1DB5-4BAF-A16B-29F2A2C7D997','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('1FDB6AD4-3860-411E-A247-22B9D00C9053','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('83BD156B-C5ED-460E-95F0-21E8B4254BF8','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2FD09C37-E224-414D-8C41-220B6528EB9C','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('A46D0B0D-70E2-4AEF-BF30-2244FFA8EF9E','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('824B7F04-51B4-48F6-920A-1FDE8571E32F','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('79DD6034-A9DC-4AC1-9CD3-338F0521AC99','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('BFD35E07-C5DE-4C8B-ADC4-36069655F450','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('D655AD53-8107-481B-A1C9-340A7B31EFB6','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('7E6FF0E9-E1F4-4522-AB91-1A64C2AC0E3A','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('3A977BFE-17F6-46FA-8568-1A8ED2F48483','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('D95A941D-DEB3-46B5-8B2B-1AC9741824ED','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('55528060-12AE-4C2E-A4A1-11E40881DEAE','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('E99B4179-DE6E-4FCB-B7B9-165C05A94424','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('20D2D92B-E45A-4883-A114-109C41E2F278','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('7161CC4A-0B3E-4B97-A973-0C5A7F26CC0D','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('5E267539-8412-4423-A82C-0C74C995D561','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('AE173244-38CD-4B8D-A1CB-0DC112AC6F54','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('3ED8BF74-D0D1-4D11-92B3-008F11E34308','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('6F77EAF9-0520-495A-ADB5-027F611E418D','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('34DAFFBC-0733-4EC0-8607-0287DA5929D6','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('5266FB2F-2829-4C60-91E7-00D9A0832B8E','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('A1EC9933-92F0-4805-93C2-071F503BE816','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('EC19E064-940A-4EEA-9A12-07D2A0680C03','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('7CA5F400-0E57-4A86-B4E1-094720E98B56','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('3A7F95B9-79B6-4323-B390-5B30AE23F66C','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('CCA677CB-8889-40E6-8FDC-54C33DCBAD93','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('345FACAF-90B2-4B2D-B6CF-577F242F28C9','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('20531AFD-21EB-4B75-B50C-5FEABDAE29DB','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('A8FF5B5F-7976-43FE-B013-67CEE5F07710','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('AEF6E39A-6CC2-48E8-9999-65D7CD103A45','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('8AB565EE-4A53-40B9-9D95-66034FD72B6D','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('B0DAC1F6-B7E0-476F-8543-6282203A72C7','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('DACE56ED-5964-44FD-9E35-68E3B409B2D7','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('C64F5A8A-1930-4824-9F0E-68EF848F2F86','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('38817195-BDB0-44AC-988D-690BE9E50FD0','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('BF4202D8-A23A-48DB-8799-694578EED45A','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('D26A3E39-EEA2-4928-82F9-676B3F901021','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('0D3F16C2-237A-4461-9851-6B0555EDADCE','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('F8CCEE52-A31D-4B6D-9F9F-6D53BE7EB919','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('BCE3146A-AACE-4CF5-ADF1-3D5E57827D96','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('5D6E4347-ABC8-4892-89EC-3FE666A8523B','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('8BD465A9-DC91-4960-BCC7-42EAEE51024A','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('54FCE80F-F551-4548-BCE2-4499AB66D93F','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('843C8651-A95D-458F-A6E7-488F5978FB56','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('4BE7BC8D-BC97-4F8F-85BB-48CC970B9465','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('6C611A14-11CC-454D-A9C8-48CF0B2776A9','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('50819781-F028-4976-A406-45D88804C566','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('1EE5DBE0-0EA3-4F9B-8C78-469D00888892','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('33B87A5D-CB69-4BD2-BEC8-4D90D6A21232','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('C31D7CD1-E9BA-4B03-BB11-4DE7022A45AD','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2E1FC057-4C57-4C27-86E4-4EC887B77ABE','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('7811CF7B-2935-47A6-92CB-520C4E0AEC4A','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2DAB5B2D-3D94-4F47-B7F5-536FAF08BCC6','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2F405742-CF20-4995-84D3-976B108DBB99','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2852C9C8-325D-4C82-837E-9D6E751B794F','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('40E87A07-DA9B-4277-90BB-8FA994470CB1','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('732DF392-C8D6-4EEF-B046-8FC6C0DB4DEC','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('AA55681E-FE4A-46E9-8809-928941C165AD','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('C146FDD8-EF42-48B4-A357-90CEE93FE902','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('A0FEAAAD-8B44-4797-BD1F-A34AC872EC39','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('A45F22EE-8740-4A3B-ABB5-A8F7EE32B107','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('1A073622-C5D6-41B0-BCC2-8220ED1978BA','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('C7CFCCDC-5ADF-4BCF-BBE4-7E6D611B96CC','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('A618A9A7-5DAC-4658-9B6F-7FC091C49122','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('0F698448-929F-4E3B-A6B1-810BF66DC9AD','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2FD04ED9-AC24-4E80-8902-7AF2351DAB7B','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2DA5D721-DFDD-4E96-9A5C-7DF7B0FA9ABB','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('76816CF3-FB2E-440D-91E7-7FF179CE2702','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('228A8BC4-D136-4FDA-B006-84FD69D583A0','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('838DCC6F-0C37-4144-9461-892F1DE2A0D4','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('E65DF83F-FDA5-4883-9E29-8CAB66297328','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('621547A3-613E-4CB7-9537-8D1FF987ADC7','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2ABB681F-5258-4DF3-A0B8-89962ADDBCB8','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('F54E5C88-17FA-407C-B457-8B69077748E9','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('63D66460-3834-4873-9BD4-74148EC300F4','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('14A19194-457F-40D3-B08E-715EF830FD75','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('75CF2565-D36A-46F6-935E-BFD82144B8A2','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('EDA93745-2009-41F6-B01F-C3F9930C0F67','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('20CFC7EE-7188-49F0-BDEB-C0CAF3610F2C','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('ED6EDD00-2151-4CA7-9F22-BF6DE74B0622','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('EC8DAC77-E516-4B8E-9FB8-C5A4C963563A','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('C6FDECC9-24BE-4AA0-B33C-C9195DC630B0','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('BD9890BA-8F8A-4596-B0F0-BA2F3467E5B4','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2F496F30-1E08-4174-ABE4-BBE3977268EF','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2CD7D3D2-77D4-43DE-A44F-B248AAF8891F','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('FFC7E6E7-00E9-41E8-BD11-B0EFD4BA3971','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('B8348F9C-D57F-4561-9981-B14DAEE7257B','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('2CAE1761-8DB0-4D18-8FF6-AD79D44EF699','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('9A241CB7-1FAE-4767-8E13-AF3A66123DC0','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('B836DB33-FB5A-4FF7-A293-D7A29488A6F6','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('23207756-F6E1-406C-AEAC-DFC1710E3E41','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('64ED1587-8791-414F-B2EA-E265584BECE9','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('07442948-0FE7-4EDD-8779-E4808B20852C','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('ACAE3351-3EDF-43E3-8021-E4CBAF20BA55','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('1E96680B-1E92-40F2-AAAE-E4D524206982','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('57A0F1D0-8029-4110-9C2A-D3A2F13E6776','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('D0A76745-1930-4755-90EA-D3CA0240BA6D','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('5379B540-4DCC-4A71-BE19-D1DA4B808A4D','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('B41B60EB-5C83-4CA6-8768-D2226A164FB6','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('31CA2727-7227-4377-B127-D261AA0CD304','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('BD7102BB-FA67-4A33-82C4-D3616ED7CB3F','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('7090FCA6-144A-430B-A609-CDDFB39C4D25','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('382BE0D2-A92A-4D73-B2CE-D640A2BBA523','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('1A4011C0-40C8-4ABD-8ACF-D6D3A220B940','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('53A62E1F-5926-4DEA-A7FB-C99B14A2120D','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('24C84EE0-70DF-4602-B133-F1CB765F2B29','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('B40C80C7-26C0-43F9-9B8A-F2C46A6FD79F','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('8F9FE478-6961-4042-A62D-F464F21BFC46','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('6E9B27D8-C963-4413-ABB5-F31F307F2AE1','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('1CCAB652-042A-4C6F-B89B-ECBFFCA468C6','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('FDA7C815-F4ED-4E6D-AE95-ED18005651EB','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('6D48A842-B5F9-45AA-BC3C-EF74C911E2FC','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('571A48F3-10E2-419C-8E72-EB4B833FA2A2','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('27C54188-4CD7-447D-9C47-E7C7F4A87A47','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('0F8E94BC-1612-4086-A6C1-E883C83758E4','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('24315A1A-CFD9-4984-AF64-F9A79E960D45','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('38602998-8149-4B6A-91EA-F9D4B93810A6','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('1FDB6A11-E422-4EA1-B4AC-FDD1197BB7F3','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('FDDCB1EA-37C9-4833-BDD8-FEFDEEF0A749','9980234') insert into stackoverflow_rules(myguid, myvarchar50) values('5241815C-CE10-4C08-BE01-CB2D1012CCF0','9980066') insert into stackoverflow_rules(myguid, myvarchar50) values('D0E5E79E-4502-42F8-B8C6-EDE3D20526B4','9970234') insert into stackoverflow_rules(myguid, myvarchar50) values('B173FC5D-BAB3-4942-A904-D9D3BA66A1ED','9960234') insert into stackoverflow_rules(myguid, myvarchar50) values('D5C2A2D9-2BA6-4059-896C-B464C8C8CB5F','9960234') insert into stackoverflow_rules(myguid, myvarchar50) values('32B865C7-1D67-457A-9550-DFDBCBFB12C6','9951166') insert into stackoverflow_rules(myguid, myvarchar50) values('82F0A99B-0C88-44EB-BE50-265C6C4C1B86','9400000') insert into stackoverflow_rules(myguid, myvarchar50) values('BDE9DC0D-B9A7-4AC9-83D5-8F9ED5F25FDA','9299199') insert into stackoverflow_rules(myguid, myvarchar50) values('2FE2415A-9D51-4AD4-9679-74BDA93DC6A6','9299166') insert into stackoverflow_rules(myguid, myvarchar50) values('4BC3D4FF-5FBB-484E-8BC6-CFE90706E3D2','9299111') insert into stackoverflow_rules(myguid, myvarchar50) values('0FC22F14-A499-4C8C-9E6B-0CF613ACF505','9281266') insert into stackoverflow_rules(myguid, myvarchar50) values('AC6B2795-A9A0-40DF-9BAF-04D4A74F4B9B','9281166') insert into stackoverflow_rules(myguid, myvarchar50) values('DAA73B60-65B9-46B2-B1AC-76A74B621700','9281166') insert into stackoverflow_rules(myguid, myvarchar50) values('D419DCBB-A76E-47DF-A59D-803AFAB770C5','9281166') insert into stackoverflow_rules(myguid, myvarchar50) values('405847E0-4764-4409-81E8-8ECCCAAE94BB','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('76D59559-F986-45EF-9F74-7870D97A377D','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('3F6F78A9-7930-4F76-839F-77304396CBC3','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('2C1A62F2-B783-432B-B83A-6BD8B29EE2DE','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('D371D319-6E88-4286-A46E-6C1905ADD6AC','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('10C42C2E-DC1A-43C4-959C-98D3A798D631','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('215F0003-188D-45C9-85BE-9B3811760CCB','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('4DD2BA43-BA1C-44BE-8C10-996454D63205','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('26D863E7-6F96-42BC-A2BA-99B30D94F6D9','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('625A2793-A60F-4FE7-9BD4-A953877B258D','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('5B5A2538-74E0-4A6F-9929-AA29BA3BDCCE','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('B8597353-0254-42AB-BAF7-AA4DAF195CC8','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('22F392BC-B42C-434F-9E32-AB8DFFC6EA76','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('E703EEE4-82B1-43C0-914F-ABCF3EF53E91','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('09BD6548-7395-4450-A7CA-D0AB0631F222','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('71D737EB-59CA-4685-827D-E17A0B4FA44D','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('F09ACB1E-64B0-4F29-86BF-E323C5347883','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('8A39E85B-8E49-44C1-8B4A-B9D79CC3F97F','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('E3BE436C-0BEC-45CE-9680-AFCE70D59B84','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('915D4F2A-8430-479F-84ED-064A3D6889DA','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('FF6DEFF5-072D-4E14-A6C2-0EF4862CCF28','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('2E7944D1-5A85-4D85-9660-138F30BED95C','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('E449E8A8-1CE4-49DE-898F-1C357777B674','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('65E89A21-5908-4913-840A-28E625F4C003','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('E23175FD-B60E-4FD4-A99A-2DB232BCB6B1','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('A521CC05-21C1-4759-AA00-384014F9C4CB','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('218CE896-8D3F-447B-A504-33428F797CE2','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('D4A3A407-20BF-481D-95DE-2C2BED13FD60','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('B5FCEB1B-3F0D-4DFE-B47D-4D44E88879A1','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('519BB489-1606-4A64-BA49-456DE79FC471','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('837D5167-CE68-4840-9592-432D371EE3AF','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('F140182F-844E-4CA7-BAA1-6A96FA726A93','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('8FB3AE45-3BFF-4DBF-ABAE-61A97EE73F36','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('33D59F0B-DAD6-4608-BF70-F2C49805FF54','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('5BFB5CEC-1322-49B0-A626-EC94092998A3','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('8AB2E1F8-A4F6-48AC-B789-FB1F46A89617','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('CD559FD0-552F-4F54-A638-F86878413D7B','9280666') insert into stackoverflow_rules(myguid, myvarchar50) values('D23AC171-E7E8-4310-B3B5-1253CCA33E5C','9251166') insert into stackoverflow_rules(myguid, myvarchar50) values('0E777743-0C70-4D76-9293-076F9DBC02EB','9251166') insert into stackoverflow_rules(myguid, myvarchar50) values('B0CDE199-9BDF-4CDD-8E32-1384CB8512B4','9200166') insert into stackoverflow_rules(myguid, myvarchar50) values('1F48F171-5179-4EC9-9554-2DA6EF60B9E8','9002266') insert into stackoverflow_rules(myguid, myvarchar50) values('A9168993-F6AF-4F81-A166-441411E72691','9001166') insert into stackoverflow_rules(myguid, myvarchar50) values('25FB4906-2AC8-4A29-B077-C4BC681D3227','9000001') insert into stackoverflow_rules(myguid, myvarchar50) values('02E14983-49E2-4867-B0C2-0BCF9BC3BAB6','8860235') insert into stackoverflow_rules(myguid, myvarchar50) values('53F915DE-1A8A-4A75-A661-0CAB56F39B11','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('834F1EB8-AEA0-435F-81AF-0C212BD54A17','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('797AFF3A-8CB0-4AE8-8430-0ED04A72394B','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('56B83693-3F46-4D8F-93A8-098517C96E94','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('1559018C-71F3-45FC-9642-09DFCC06EA78','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('04A86146-97FC-46C4-B1FE-07E916509908','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('1A3367B3-CB36-40CA-8D7D-02206840089A','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('33626BD1-AED2-4AEF-9289-199F641FDFE0','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('8468E795-71A8-4417-8179-1778FD7E915E','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('9EE6FF40-AAFB-46A8-8655-186515189AB8','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('D314A6A4-BBB5-4499-9EF4-1B37EA9131B6','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('788898AF-48E6-4DA0-BDBB-12871FE81D35','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('34D55FA5-FF82-49B5-A4EF-144999BB1B4F','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('C8FF93B1-EB7C-4711-85BA-14C78B7A27C1','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('54199346-624C-4B1E-8293-14EE9C6EF23B','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('5105C133-9120-4075-9EB6-151569E0719D','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('D03366DB-BC4A-44CC-ABC8-151F627E2A95','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('40EF76A3-2250-4840-90C1-1577AE855EEE','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('8E229744-7528-4727-880A-168331E72ED0','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('10F66C0C-C97B-4A8B-9FAC-160F3AA09A62','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('8173CB1C-A65D-4B89-9BD3-2DC4BA2F4C72','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('1CEAE246-6323-402D-95DB-2AC25DF1FD83','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('BB859D4A-3B1C-40FC-8C74-2BD44902894C','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('A31C45AF-D149-4789-A22D-2FB3E6A17627','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('52F98EEC-D3AC-429C-948F-306FA865EDE7','8860234') insert into stackoverflow_rules(myguid, myvarchar50) values('06E84032-C102-49F4-B544-3169FC1C62F4','8860234') insert into stackoverflo

    Read the article

  • XSL unique values per node per position

    - by Nathan Colin
    this get ever more complicated :) now i face another issue in last question we managed to take unique values from only one parent node now with: <?xml version="1.0" encoding="ISO-8859-1"?> <roots> <root> <name>first</name> <item> <something>A</something> <something>A</something> </item> <item> <something>B</something> <something>A</something> </item> <item> <something>C</something> <something>P</something> </item> <item> <something>A</something> <something>L</something> </item> <item> <something>A</something> <something>A</something> </item> <item> <something>B</something> <something>A</something> </item> <item> <something>D</something> <something>A</something> </item> </root> <root> <name>second</name> <item> <something>E</something> <something>A</something> </item> <item> <something>B</something> <something>A</something> </item> <item> <something>F</something> <something>A</something> </item> <item> <something>A</something> <something>A</something> </item> <item> <something>A</something> <something>A</something> </item> <item> <something>B</something> <something>H</something> </item> <item> <something>D</something> <something>G</something> </item> </root> </roots> now i need to get the unique values depending only from one node before but just from the elements on the second position <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes" method="text"/> <xsl:key name="item-by-value" match="something" use="concat(normalize-space(.), ' ', generate-id(./ancestor::root))"/> <xsl:key name="rootkey" match="root" use="name"/> <xsl:template match="/"> <xsl:for-each select="key('rootkey','first')"> <xsl:for-each select="item/something[1]"> <xsl:sort /> <xsl:if test="generate-id() = generate-id(key('item-by-value', concat(normalize-space(.), ' ', generate-id(./ancestor::root))))"> <xsl:value-of select="."/> </xsl:if> </xsl:for-each> <xsl:text>_________</xsl:text> <xsl:for-each select="item/something[2]"> <xsl:sort /> <xsl:if test="generate-id() = generate-id(key('item-by-value', concat(normalize-space(.), ' ', generate-id(./ancestor::root))))"> <xsl:value-of select="."/> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:template> </xsl:stylesheet> with this XSL i get ABCD__LP where the result i need is ABCD__ALP any ideas?

    Read the article

  • Counting unique values in a column with a shell script

    - by Lilly Tooner
    Hello. I have a tab delimited file with 5 columns and need to retrieve a count of just the number of unique lines from column 2. I would normally do this with Perl/Python but I am forced to use the shell for this one. I have successfully in the past used *nix uniq function piped to wc but it looks like I am going to have to use awk in here. Any advice would be greatly appreciated. (I have asked a similar question previously about column checks using awk but this is a little different and I wanted to separate it so if someone in the future has this question this will be here) Many many thanks! Lilly

    Read the article

  • Oracle pl\sql question for my homework in oracle 11G class [migrated]

    - by Bjolds
    I am new to oracle 11G programming and i have run into a tough situation with pl\sql funtions and automation. I ame unsure how to create the function for the automation of Registration system for a College registration system. Here is what i want to do. I want to automate the registrations system so that it automaticly registers students. Then I want a procedure to automate the grading system. I have included the code that i am written to make most of this assignment work which it does but unsure how to incorporate Pl\SQL automated fuctions for the registrations system, and the grading system. So Any help or Ideas I would greatly appreciate please. set Linesize 250 set pagesize 150 drop table student; drop table faculty; drop table Course; drop table Section; drop table location; DROP TABLE courseInstructor; DROP TABLE Registration; DROP TABLE grade; create table student( studentid number(10), Lastname varchar2(20), Firstname Varchar2(20), MI Char(1), address Varchar2(20), city Varchar2(20), state Char(2), zip Varchar2(10), HomePhone Varchar2(10), Workphone Varchar2(10), DOB Date, Pin VARCHAR2(10), Status Char(1)); ALTER TABLE Student Add Constraint Student_StudentID_pk Primary Key (studentID); Insert into student values (1,'xxxxxxxx','xxxxxxxxxx','x','xxxxxxxxxxxxxxx','Columbus','oh','44159','xxx-xxx-xxxx','xxx-xxx-xxxx','06-Mar-1957','1211','c'); create table faculty( FacultyID Number(10), FirstName Varchar2(20), Lastname Varchar2(20), MI Char(1), workphone Varchar2(10), CellPhone Varchar2(10), Rank Varchar2(20), Experience Varchar2(10), Status Char(1)); ALTER TABLE Faculty ADD Constraint Faculty_facultyId_PK PRIMARY KEY (FacultyID); insert into faculty values (1,'xxx','xxxxxxxxxxxx',xxx-xxx-xxxx','xxx-xxx-xxxx','professor','20','f'); create table Course( CourseId number(10), CourseNumber Varchar2(20), CourseName Varchar(20), Description Varchar(20), CreditHours Number(4), Status Char(1)); ALTER TABLE Course ADD Constraint Course_CourseID_pk PRIMARY KEY(CourseID); insert into course values (1,'cit 100','computer concepts','introduction to PCs','3.0','o'); insert into course values (2,'cit 101','Database Program','Database Programming','4.0','o'); insert into course values (3,'Math 101','Algebra I','Algebra I Concepts','5.0','o'); insert into course values (4,'cit 102a','Pc applications','Aplications 1','3.0','o'); insert into course values (5,'cit 102b','pc applications','applications 2','3.0','o'); insert into course values (6,'cit 102c','pc applications','applications 3','3.0','o'); insert into course values (7,'cit 103','computer concepts','introduction systems','3.0','c'); insert into course values (8,'cit 110','Unified language','UML design','3.0','o'); insert into course values (9,'cit 165','cobol','cobol programming','3.0','o'); insert into course values (10,'cit 167','C++ Programming 1','c++ programming','4.0','o'); insert into course values (11,'cit 231','Expert Excel','spreadsheet apps','3.0','o'); insert into course values (12,'cit 233','expert Access','database devel.','3.0','o'); insert into course values (13,'cit 169','Java Programming I','Java Programming I','3.0','o'); insert into course values (14,'cit 263','Visual Basic','Visual Basic Prog','3.0','o'); insert into course values (15,'cit 275','system analysis 2','System Analysis 2','3.0','o'); create table Section( SectionID Number(10), CourseId Number(10), SectionNumber VarChar2(10), Days Varchar2(10), StartTime Date, EndTime Date, LocationID Number(10), SeatAvailable Number(3), Status Char(1)); ALTER TABLE Section ADD Constraint Section_SectionID_PK PRIMARY KEY(SectionID); insert into section values (1,1,'18977','r','21-Sep-2011','10-Dec-2011','1','89','o'); create table Location( LocationId Number(10), Building Varchar2(20), Room Varchar2(5), Capacity Number(5), Satus Char(1)); ALTER TABLE Location ADD Constraint Location_LocationID_pk PRIMARY KEY (LocationID); insert into Location values (1,'Clevleand Hall','cl209','35','o'); insert into Location values (2,'Toledo Circle','tc211','45','o'); insert into Location values (3,'Akron Square','as154','65','o'); insert into Location values (4,'Cincy Hall','ch100','45','o'); insert into Location values (5,'Springfield Dome','SD','35','o'); insert into Location values (6,'Dayton Dorm','dd225','25','o'); insert into Location values (7,'Columbus Hall','CB354','15','o'); insert into Location values (8,'Cleveland Hall','cl204','85','o'); insert into Location values (9,'Toledo Circle','tc103','75','o'); insert into Location values (10,'Akron Square','as201','46','o'); insert into Location values (11,'Cincy Hall','ch301','73','o'); insert into Location values (12,'Dayton Dorm','dd245','57','o'); insert into Location values (13,'Springfield Dome','SD','65','o'); insert into Location values (14,'Cleveland Hall','cl241','10','o'); insert into Location values (15,'Toledo Circle','tc211','27','o'); insert into Location values (16,'Akron Square','as311','28','o'); insert into Location values (17,'Cincy Hall','ch415','73','o'); insert into Location values (18,'Toledo Circle','tc111','67','o'); insert into Location values (19,'Springfield Dome','SD','69','o'); insert into Location values (20,'Dayton Dorm','dd211','45','o'); Alter Table Student Add Constraint student_Zip_CK Check(Rtrim (Zip,'1234567890-') is null); Alter Table Student ADD Constraint Student_Status_CK Check(Status In('c','t')); Alter Table Student ADD Constraint Student_MI_CK2 Check(RTRIM(MI,'abcdefghijklmnopqrstuvwxyz')is Null); Alter Table Student Modify pin not Null; Alter table Faculty Add Constraint Faculty_Status_CK Check(Status In('f','a','i')); Alter table Faculty ADD Constraint Faculty_Rank_CK Check(Rank In ('professor','doctor','instructor','assistant','tenure')); Alter table Faculty ADD Constraint Faculty_MI_CK2 Check(RTRIM(MI,'abcdefghijklmnopqrstuvwxyz')is Null); Update Section Set Starttime = To_date('09-21-2011 6:00 PM', 'mm-dd-yyyy hh:mi pm'); Update Section Set Endtime = To_date('12-10-2011 9:50 PM', 'mm-dd-yyyy hh:mi pm'); alter table Section Add Constraint StartTime_Status_CK Check (starttime < Endtime); Alter Table Section Add Constraint Section_StartTime_ck check (StartTime < EndTime); Alter Table Section ADD Constraint Section_CourseId_FK FOREIGN KEY (CourseID) References Course(CourseId); Alter Table Section ADD Constraint Section_LocationID_FK FOREIGN KEY (LocationID) References Location (LocationId); Alter Table Section ADD Constraint Section_Days_CK Check(RTRIM(Days,'mtwrfsu')IS Null); update section set seatavailable = '99'; Alter Table Section ADD Constraint Section_SeatsAvailable_CK Check (SeatAvailable < 100); Alter Table Course Add Constraint Course_CreditHours_ck check(CreditHours < = 6.0); update location set capacity = '99'; Alter Table Location Add Constraint Location_Capacity_CK Check(Capacity < 100); Create Table Registration ( StudentID Number(10), SectionID Number(10), Constraint Registration_pk Primary key (studentId, Sectionid)); Insert into registration values (1, 2); Insert into Registration values (2, 3); Insert into registration values (3, 4); Insert into registration values (4, 5); Insert into registration values (5, 6); Insert into registration values (6, 7); Insert into registration values (7, 8); Insert into registration values (8, 9); insert into registration values (9, 10); insert into registration values (10, 11); insert into registration values (9, 12); insert into registration values (8, 13); insert into registration values (7, 14); insert into registration values (6, 15); insert into registration values (5, 17); insert into registration values (4, 18); insert into registration values (3, 19); insert into registration values (2, 20); insert into registration values (1, 21); insert into registration values (2, 22); insert into registration values (3, 23); insert into registration values (4, 24); insert into registration values (5, 25); Insert into registration values (6, 24); insert into registration values (7, 23); insert into registration values (8, 22); insert into registration values (9, 21); insert into registration values (10, 20); insert into registration values (9, 19); insert into registration values (8, 17); Create Table courseInstructor( FacultyID Number(10), SectionID Number(10), Constraint CourseInstructor_pk Primary key (FacultyId, SectionID)); insert into courseInstructor values (1, 1); insert into courseInstructor values (2, 2); insert into courseInstructor values (3, 3); insert into courseInstructor values (4, 4); insert into courseInstructor values (5, 5); insert into courseInstructor values (5, 6); insert into courseInstructor values (4, 7); insert into courseInstructor values (3, 8); insert into courseInstructor values (2, 9); insert into courseInstructor values (1, 10); insert into courseInstructor values (5, 11); insert into courseInstructor values (4, 12); insert into courseInstructor values (3, 13); insert into courseInstructor values (2, 14); insert into courseInstructor values (1, 15); Create table grade( StudentID Number(10), SectionID Number(10), Grade Varchar2(1), Constraint grade_pk Primary key (StudentID, SectionID)); CREATE OR REPLACE TRIGGER TR_CreateGrade AFTER INSERT ON Registration FOR EACH ROW BEGIN INSERT INTO grade (SectionID,StudentID,Grade) VALUES(:New.SectionID,:New.StudentID,NULL); END TR_createGrade; / CREATE OR REPLACE FORCE VIEW V_reg_student_course AS SELECT Registration.StudentID, student.LastName, student.FirstName, course.CourseName, Registration.SectionID, course.CreditHours, section.Days, TO_CHAR(StartTime, 'MM/DD/YYYY') AS StartDate, TO_CHAR(StartTime, 'HH:MI PM') AS StartTime, TO_CHAR(EndTime, 'MM/DD/YYYY') AS EndDate, TO_CHAR(EndTime, 'HH:MI PM') AS EndTime, location.Building, location.Room FROM registration, student, section, course, location WHERE registration.StudentID = student.StudentID AND registration.SectionID = section.SectionID AND section.LocationID = location.LocationID AND section.CourseID = course.CourseID; CREATE OR REPLACE FORCE VIEW V_teacher_to_course AS SELECT courseInstructor.FacultyID, faculty.FirstName, faculty.LastName, courseInstructor.SectionID, section.Days, TO_CHAR(StartTime, 'MM/DD/YYYY') AS StartDate, TO_CHAR(StartTime, 'HH:MI PM') AS StartTime, TO_CHAR(EndTime, 'MM/DD/YYYY') AS EndDate, TO_CHAR(EndTime, 'HH:MI PM') AS EndTime, location.Building, location.Room FROM courseInstructor, faculty, section, course, location WHERE courseInstructor.FacultyID = faculty.FacultyID AND courseInstructor.SectionID = section.SectionID AND section.LocationID = location.LocationID AND section.CourseID = course.CourseID; SELECT * FROM V_reg_student_course; SELECT * FROM V_teacher_to_course;

    Read the article

  • How to set two column unique in SQL.

    - by sxingfeng
    I am creating a table ,in the table two column is unique, I mean columnA and columnB do not have same value: such as : Table X A B 1 2(RIGHT,unique) 2 2(RIGHT, unique) 1 3(RIGHT, not unique) 2 3(RIGHT, not unique) 1 2 (WRONG, not unique) How to create such a table? many thanks!

    Read the article

  • How to access values of dynamically created TextBoxes

    - by SAMIR BHOGAYTA
    If one adds controls dynamically to a page and wants to get their information after PostBack, one needs to recreate these elements after the PostBack. Let's consider the following idea: First you create some controls: for(int i=0;i TextBox objBox = new TextBox(); objBox.ID = "objBox" + i.ToString(); this.Page.Controls.Add(objBox); } After PostBack, you want to retrieve the text entered in the third TextBox. If you try this: String strText = objBox2.Text; you'll receive an exception. Why? Because the boxes have not been created again and the local variable objBox2 simply not exists. How to retrieve the Box? You'll need to recreate the box by using the code above. Then, you may try to get its value by using the following code: TextBox objBox2; objBox2 = this.Page.FindControl("objBox2") as TextBox; if(objBox2 != null) Response.Write(objBox2.Text);

    Read the article

  • unique constraint (w/o Trigger) on "one-to-many" relation

    - by elgcom
    To illustrate the problem, I make an example: A tag_bundle consists of one or more than one tags. A unique tag combination can map to a unique tag_bundle, vice versa. tag_bundle tag tag_bundle_relation +---------------+ +--------+ +---------------+--------+ | tag_bundle_id | | tag_id | | tag_bundle_id | tag_id | +---------------+ +--------+ +---------------+--------+ | 1 | | 100 | | 1 | 100 | +---------------+ +--------+ +---------------+--------+ | 101 | | 1 | 101 | +--------+ +---------------+--------+ There can't be another tag_bundle having the combination from tag 100 and tag 101. How can I ensure such unique constraint when executing SQL "concurrently"!! that is, to prevent concurrently adding two bundles with the same tag combination Adding a simple unique constraint on any table does not work, Is there any solution other than Trigger or explicit lock. I come to only this simple way: make tag combination into string, and let it be unique. tag_bundle (unique on tags) tag tag_bundle_relation +---------------+--------+ +--------+ +---------------+--------+ | tag_bundle_id | tags | | tag_id | | tag_bundle_id | tag_id | +---------------+--------+ +--------+ +---------------+--------+ | 1 | 100,101| | 100 | | 1 | 100 | +---------------+--------+ +--------+ +---------------+--------+ | 101 | | 1 | 101 | +--------+ +---------------+--------+ but it seems not a good way :(

    Read the article

  • Creating a short unique string for each unique long string

    - by king.net
    I'm trying to create a url shortener system in c# and asp.net mvc. I know about hashtable and I know how to create a redirect system etc. The problem is indexing long urls in database. Some urls may have up to 4000 character length, and it seems it is a bad idea to index this kind of strings. The question is: How can I create a unique short string for each url? for example MD5 can help me? Is MD5 really unique for each string? NOTE: I see that Gravatar uses MD5 for emails, so if each email address is unique, then its MD5 hashed value is unique. Is it right? Can I use same solution for urls?

    Read the article

  • mysql unique-constraint

    - by Cypher
    I have two tables -- Variables (id, name) and Variable_Entries (id, var_id, value). I want each variable to have a unique set of entries. If I make the value entry unique then a different variable won't be able to have that same value which is not right. Is there some way to make the value column unique for identical var_id's?

    Read the article

  • UNIQUE Constraints in SQL (MS-SQL)

    - by rockbala
    Why are UNIQUE Constraints needed in database ? Can you provide any examples ? Primary Key is UNIQUE by default... Understandable as they are referred in other tables as Foreign keys... relation is needed to connect them for rdbms platform... but why would one refer to other columns as UNIQUE, what is benefit of doing so ?)

    Read the article

  • UNIQUE Constraints in SQL (SQL Server)

    - by rockbala
    Why are UNIQUE Constraints needed in database ? Can you provide any examples ? Primary Key is UNIQUE by default... Understandable as they are referred in other tables as Foreign keys... relation is needed to connect them for rdbms platform... but why would one refer to other columns as UNIQUE, what is benefit of doing so ?)

    Read the article

  • Filtering out unique rows in MySQL

    - by jpatokal
    So I've got a large amount of SQL data that looks basically like this: user | src | dst 1 | 1 | 1 1 | 1 | 1 1 | 1 | 2 1 | 1 | 2 2 | 1 | 1 2 | 1 | 3 I want to filter out pairs of (src,dst) that are unique to one user (even if that user has duplicates), leaving behind only those pairs belonging to more than one user: user | src | dst 1 | 1 | 1 1 | 1 | 1 2 | 1 | 1 In other words, pair (1,2) is unique to user 1 and pair (1,3) to user 2, so they're dropped, leaving behind only all instances of pair (1,1). Any ideas? The answers to the question below can find the non-unique pairs, but my SQL-fu doesn't suffice to handle the complication of requiring that they belong to multiple users as well. [SQL question] How to select non "unique" rows

    Read the article

  • Generate unique ID from multiple values with fault tolerance

    - by ojreadmore
    Given some values, I'd like to make a (pretty darn) unique result. $unique1 = generate(array('ab034', '981kja7261', '381jkfa0', 'vzcvqdx2993883i3ifja8', '0plnmjfys')); //now $unique1 == "sqef3452y"; I also need something that's pretty close to return the same result. In this case, 20% of the values is missing. $unique2 = generate(array('ab034', '981kja7261', '381jkfa0', 'vzcvqdx2993883i3ifja8')); //also $unique2 == "sqef3452y"; I'm not sure where to begin with such an algorithm but I have some assumptions. I assume that the more values given, the more accurate the resulting ID – in other words, using 20 values is better than 5. I also assume that a confidence factor can be calculated and adjusted. What would be nice to have is a weight factor where one can say 'value 1 is more important than value 3'. This would require a multidimensional array for input instead of one dimension. I just mashed on the keyboard for these values, but in practice they may be short or long alpha numeric values.

    Read the article

  • Primary Key Identity Value Increments On Unique Key Constraint Violation

    - by Jed
    I have a SqlServer 2008 table which has a Primary Key (IsIdentity=Yes) and three other fields that make up a Unique Key constraint. In addition I have a store procedure that inserts a record into the table and I call the sproc via C# using a SqlConnection object. The C# sproc call works fine, however I have noticed interesting results when the C# sproc call violates the Unique Key constraint.... When the sproc call violates the Unique Key constraint, a SqlException is thrown - which is no surprise and cool. However, I notice that the next record that is successfully added to the table has a PK value that is not exactly one more than the previous record - For example: Say the table has five records where the PK values are 1,2,3,4, and 5. The sproc attempts to insert a sixth record, but the Unique Key constraint is violated and, so, the sixth record is not inserted. Then the sproc attempts to insert another record and this time it is successful. - This new record is given a PK value of 7 instead of 6. Is this normal behavior? If so, can you give me a reason why this is so? (If a record fails to insert, why is the PK index incremented?) If this is not normal behavior, can you give me any hints as to why I am seeing these symptoms?

    Read the article

  • Unique SMS sender id?

    - by Pascal
    Hello, I want to build an app that send SMS to people. However, I want my users to know that the SMS comes from the app and nothing else so they can't fake it. Is there a way to guarantee that the sender ID is unique to my app? It seems that sending a SMS by phone is with a unique SENDER ID for each phone number. But, from what I read, I don't think it is the case when sending a SMS through a web gateway. Is this correct? I am not an expert in mobile phone security. Of course, I am willing to pay the price for a unique sender id, if such thing is possible. Regards, Pascal

    Read the article

  • R - find and calculate with unique combinations of values

    - by lecodesportif
    I would like to work with unique combinations of var1 and var2. foo <- data.frame(var1= c(1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4), var2=c(1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 3, 3)) As has been noted (+1 for answers), unique(foo) results in this: var1 var2 1 1 1 2 2 1 3 2 2 4 3 1 5 3 2 6 4 2 7 4 3 Based on the unique combinations, how do I get the number of occurrences of a var1 value and the sum (bla) of each var1 value's var2 values. The output could look like this: var1 n bla 1 1 1 1 2 2 2 3 3 3 2 3 4 4 2 5 edit: The question was too basic and probably duplicate so I extended it.

    Read the article

  • SharePoint: Unique column values

    - by Anoop
    I Want to have only unique values in a SharePoin List. To achieve this I can use 'ItemAdding' event handler as mentioned in the below link. http://weblogs.asp.net/vikram/archive/2008/12/24/sharepoint-using-event-handler-to-make-a-column-unique.aspx Now I have a Doubt: Suppose that two user tries to add list Item in the list with the same column value(which requires unique value) at the same Time. will ItemAdding event would be fired at the same time for both call? If so then there is a possibility that two items having same value in the column. Please confirm.

    Read the article

  • How to generate unique number of 12 digits?

    - by DanSogaard
    I'm working on an app that sends raw data to zebra printer and print out barcodes. And since every item has its own unique barcode, I need to define a variable that automatically generates unique number of 12 digits long. see example: printBar prnt = new printBar("123456789012"); Is there anyway to define a double variable and pass it to a function that return uniqely 12 digits number and pass it over again to the printBar class?. But how to make sure everytime you access it returns a unique value?. I also thought of another way, since am using MS Access db, I can create a column of AutoNumber datatype and assign it to Random, but you don't get the exact 12 digits required, sometimes it generates a value of 10 digits sometimes more or less.

    Read the article

  • mysql create table help with unique

    - by Matt
    I'm trying to create a table, and can't figure out how to assign two columns to be unique.. I know how to alter a table thats already created, but how do you do it in the create.. im after a create if not exist col1 TEXT, col2 TEXT, col3 TEXT unique(col1, col2) ^very rough basic but you get the idea

    Read the article

  • SQL Server: "Mostly-unique" index

    - by Ian Boyd
    In a table i want to ensure that only unique vales exist over the five-column key: Timestamp Account RatingDate TripHistoryKey EventAction ========= ======= ========== ============== =========== 2010511 1234 2010511 1 INSERT 2010511 1234 2010511 4 INSERT 2010511 1234 2010511 7 INSERT 2010511 1234 2010511 1 INSERT <---duplicate But i only want the unique constraint to apply between rows when EventAction is INSERT: Timestamp Account RatingDate TripHistoryKey EventAction ========= ======= ========== ============== =========== 2010511 1234 2010511 1 INSERT 2010511 1234 2010511 1 UPDATE 2010511 1234 2010511 1 UPDATE <---not duplicate 2010511 1234 2010511 1 UPDATE <---not duplicate 2010511 1234 2010511 1 DELETE <---not duplicate 2010511 1234 2010511 1 DELETE <---not duplicate 2010511 1234 2010511 1 INSERT <---DUPLICATE Possible?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >