Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Tag Cloud
access acer asus bios bsod computer crash driver drivers error ethernet excel freeze gaming gpu hard drive hardware hdmi internet laptop mac malware memory monitor motherboard music network printer problem ram registry router server slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Software Development >
sql help

Reply  
Thread Tools
rh71's Avatar
Member with 105 posts.
 
Join Date: Jun 2000
Location: LI, NY USA
Experience: Advanced
04-Feb-2010, 06:33 PM #1
sql help
MS SQL db table "BLAH":

Item - UserMain - UserAlt
whistle - john@test.com - barry@test.com
keys - larry@test.com - ted@test.com
clock - ted@test.com - cory@test.com
phone - john@test.com - zack@test.com
radio - john@test.com - cory@test.com
candy - larry@test.com - john@test.com

Having trouble figuring out how to output to 2 columns, distinct users with the items they are attached to...
USER - ITEMS
john@test.com - whistle phone radio candy
barry@test.com - whistle
larry@test.com - keys candy
ted@test.com - keys clock
cory@test.com - clock radio
zack@test.com - phone

I would then use ColdFusion to email each user individually with the items they're responsible for (but that's pretty straightforward from there). I have also been toying with doing all of it in CF (arrays) but that isn't exactly working out either. Any guidance appreciated.
__________________
http://www.rh71.com
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
05-Feb-2010, 06:50 AM #2
Well I don't know much about SQL databases, only Access. One way to do this would be to use a Temporary Table which has the UserName and Items, then use an Update query to add each Item to the Items field first for the UserMain and then for the UserAlt.
Or you could use a VBA Recordset to do the same thing, including creating the email, depending on which email program you use.
__________________
OBP
I do not give up easily
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 05:21 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.