Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. One Too Many

One Too Many

Scheduled Pinned Locked Moved The Weird and The Wonderful
c++comtutorialworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AspDotNetDev
    wrote on last edited by
    #1

    A table in the live production environment:

    CREATE TABLE setPaymentPlans
    (
    [cppDivision1] [varchar](12) NOT NULL,
    [cppDivision2] [varchar](12) NULL,
    [cppDivision3] [varchar](12) NULL,
    [cppDivision4] [varchar](12) NULL,
    [cppDivision5] [varchar](12) NULL,
    [cppDivision6] [varchar](12) NULL,
    [cppDivision7] [varchar](12) NULL,
    [cppDivision8] [varchar](12) NULL,
    [cppDivision9] [varchar](12) NULL,
    [cppDivision10] [varchar](12) NULL,
    [cppDivision11] [varchar](12) NULL,
    [cppDivision12] [varchar](12) NULL,
    [cppDivision13] [varchar](12) NULL,
    [cppDivision14] [varchar](12) NULL,
    [cppDivision15] [varchar](12) NULL,
    [cppDivision16] [varchar](12) NULL,
    [cppDivision17] [varchar](12) NULL,
    [cppDivision18] [varchar](1) NULL,
    -- Other fields...
    )

    Perhaps they thought adding another table for a one to many relationship would be one too many tables. :rolleyes: Also, you'll note the prefix of "cpp". I guess they changed the name of the table at some point and didn't feel like changing the prefix. Some people really need to learn how to use table aliases. And I have no idea why that last one is a varchar(1) rather than a varchar(12).

    [Forum Guidelines]

    L 1 Reply Last reply
    0
    • A AspDotNetDev

      A table in the live production environment:

      CREATE TABLE setPaymentPlans
      (
      [cppDivision1] [varchar](12) NOT NULL,
      [cppDivision2] [varchar](12) NULL,
      [cppDivision3] [varchar](12) NULL,
      [cppDivision4] [varchar](12) NULL,
      [cppDivision5] [varchar](12) NULL,
      [cppDivision6] [varchar](12) NULL,
      [cppDivision7] [varchar](12) NULL,
      [cppDivision8] [varchar](12) NULL,
      [cppDivision9] [varchar](12) NULL,
      [cppDivision10] [varchar](12) NULL,
      [cppDivision11] [varchar](12) NULL,
      [cppDivision12] [varchar](12) NULL,
      [cppDivision13] [varchar](12) NULL,
      [cppDivision14] [varchar](12) NULL,
      [cppDivision15] [varchar](12) NULL,
      [cppDivision16] [varchar](12) NULL,
      [cppDivision17] [varchar](12) NULL,
      [cppDivision18] [varchar](1) NULL,
      -- Other fields...
      )

      Perhaps they thought adding another table for a one to many relationship would be one too many tables. :rolleyes: Also, you'll note the prefix of "cpp". I guess they changed the name of the table at some point and didn't feel like changing the prefix. Some people really need to learn how to use table aliases. And I have no idea why that last one is a varchar(1) rather than a varchar(12).

      [Forum Guidelines]

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      FTFY :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


      I only read formatted code with indentation, so please use PRE tags for code snippets.


      I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).


      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups