Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mateenmohd
Constraint Violating Yak Guru
297 Posts |
Posted - 2007-05-29 : 02:29:31
|
we use following query.select safetyvideo2007.user_id,safetyvideoview.user_id,safetyvideoview.name,safetyvideo2007.vdate,safetyvideo2007.video1,safetyvideo2007.video2,............from safetyvideo2007,safetyvideoview where safetyvideo2007.user_id=safetyvideoview.user_id order by safetyvideoview.name, safetyvideo2007.vdate ascupto video44 fieldstable1---------------user_id varcharvideo1 varcharvideo2 varchar...video44 varchartable2---------------user_id varcharname varcharcould we use sum / count function in above query thathow many video view by the ecah user ?we have 44 safety video (15 minutes), user have to viewthese videos in different date.regardsMateen |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-05-29 : 02:36:14
|
You need to normalize your table structure, mate. Your table does not seem to be even in 1st normal form.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
mateenmohd
Constraint Violating Yak Guru
297 Posts |
Posted - 2007-05-29 : 02:51:19
|
thanks for response.data inserting by asp program, in asp we could not insert 44 video name in one fieldhece I store 44 video name in 44 fields. nvarchar datatype also not support sum / countfunction. any other way / procedure could support sum / count to varchar field ? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-05-29 : 22:52:21
|
quote: we could not insert 44 video name in one field
Then can you insert 44 records into a table ?Your table should be basicallytable1---------------user_id varchar(100) <pk>video varchar(100) <pk> KH |
|
|
mateenmohd
Constraint Violating Yak Guru
297 Posts |
Posted - 2007-05-30 : 04:07:49
|
thanks for response.yes, then we can insert 44 record into a table.table1 no <pk>----------------------user_id varcharvideo1 varcharvideo2 varchar...video44 varchartable2---------------user_id varchar(100) <pk>name varchar (100) <pk>table1 using only to insert user_id and number of video view record.multiple users inserting the multiple video record into table1.regardsMateen |
|
|
|
|
|
|
|