Results 1 to 9 of 9

Thread: Three Family Picture Tables

  1. #1
    Join Date
    Apr 2005
    Location
    massachusetts
    Posts
    9

    Three Family Picture Tables

    I have three tables.
    Picture, Picture Group, and Picture description.

    I have picture id, path and date in picture table.

    I have Picture grpid, Group in picture group table.

    I have Pic_descid and Description in the picture description table.

    The question i have is where do i store the pictures? In the picture table i have the location and date. when i write a query for date i have to format the query, i have dummy data for path like c:\saru\img.gif1, 2, and 3.

    where would i have the actual pictures.

    I am thinking if i had the path in the db and would i have the thumb nails in a file on the web server?

    Please help me. Thanks/Saru

  2. #2
    Join Date
    Feb 2003
    Posts
    1,048
    Yes, the best way is to store the files on the webserver.

  3. #3
    Join Date
    Apr 2005
    Location
    massachusetts
    Posts
    9

    Format the date in my Query

    Thanks.

    If i have a date as a field for date in my db, how would i query to get a formated date. Right now when i query i get 1996-01-10 00:00:00.000.

    Thanks/Saru

  4. #4
    Join Date
    Feb 2003
    Posts
    1,048
    How do you want the date to look?

    Check out "Set DateFormat" and Convert() in Books Online.

  5. #5
    Join Date
    Apr 2005
    Location
    massachusetts
    Posts
    9
    i want the date to appear simple like 04/25/2005. Thanks

  6. #6
    Join Date
    Feb 2003
    Posts
    1,048
    Convert(varchar, DateField, 101)

  7. #7
    Join Date
    Apr 2005
    Location
    massachusetts
    Posts
    9
    SELECT Path, Cvt([Date])
    FROM Picture;

    I tried like the above. I got an error.
    DB am using is sql server 2000.

    Thanks/Saru

  8. #8
    Join Date
    Feb 2003
    Posts
    1,048
    What is CVT()? Never heard of it, and it's not what I suggested.


    SELECT Path, Convert(varchar, [Date], 101)
    FROM Picture



    When posting that you got an error, please tell us what the error is.

  9. #9
    Join Date
    Apr 2005
    Location
    massachusetts
    Posts
    9
    Thank you very much.

Posting Permissions

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