Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2006
    Posts
    157

    Unanswered: Save values in different format

    Hi: Can any one please help me how to i save values in '1','2','3' after users enters values in a textbox like that 1,2,3

    WHERE ((table1.field1) In (SELECT Cstr(Nz([field22], "")) FROM [table2]));
    table1.field1 is type text and values are store in like 1,2,3
    table2.field2 is type number

    The SQL "in" will not be work until i put the values in field1 like '1','2','3'. So i want when user done with entering values i will be change them into '1','2','3','4'. If i use a listbox, does listbox save values like that i mean in quotations automatically?

    Thanks.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    want a hint? [b]never[/b[ store a comma-delimited list in a single column value

    neither 1,2,3 nor '1','2','3'
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jul 2006
    Posts
    157
    Can you please tell me how do i store a comma-delimited list in a single column value.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    not a good idea!
    add another table and keep all these individual values separate.

    you can build your CSVstring anytime you need it, when you need it, but DON'T store it in your table.

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by mustish1
    Can you please tell me how do i store a comma-delimited list in a single column value.
    no
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •