473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SQL Web Service Stored Procedure

Hello, I am working on a web service for retreving news updates and need some help with a stored procedure.

I have 3 tables

1. tblstory ( to hold the news article, headline, date etc)
fldstoryID (PK)
fldheadline
fldstory
flddate
fldtype

2. tblsymbol ( to hold stock symbol, company name, industry)
fldsymbolID (PK)
fldsymbol
fldcompanyname
fldindustry

3. tblstorysymbol ( to hold the storyID and symbolID - many to many)
fldstorysymbolID (PK)
fldstoryID (FK)
fldsymbolID (FK)

I want to be able to have a stored procedure to insert a new story into the above tables by sending it the symbol, headline, story, date, and category.

A. It has to create a tblstory record with the passed headline, story, date and category
B. Lookup the passed stock symbol in tblsymbol and return the symbolID of that stock symbol if it exists otherwise add the stock symbol to the tblsymbol
C. Create a tblstorysymbol record with the storyID and stockID

If you have any suggestions I would appreciate it. This is being done in MSSQL 7.

Here is a copy of the view I use in case it helps-

SELECT dbo.tblsymbol.fldsymbol AS Symbol, dbo.tblstory.fldheadline AS Headline, dbo.tblstory.fldstory AS Story, dbo.tblstory.flddate,
dbo.tblstory.fldtime
FROM dbo.tblsymbol LEFT OUTER JOIN
dbo.tblstorysymbol ON dbo.tblsymbol.fldsymbolID = dbo.tblstorysymbol.fldsymbolID FULL OUTER JOIN
dbo.tblstory ON dbo.tblstorysymbol.fldstoryID = dbo.tblstory.fldstoryID
WHERE (dbo.tblsymbol.fldsymbol = '[GOOG]')



Thanks in advance
Oct 27 '06 #1
0 1189

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: aychai | last post by:
Hi all, I am trying to make use Oracle9i db to call an external .Net Web Service from a JAva Stored Procedure. I created the .Net Web Service and use JDeveloper 9.0.3.4Build(1247) to create...
0
by: mthomas | last post by:
Hi there, I am using VS.net c++. I created a test dialog box application. I added an addressing we reference. There is button on the dialog that executes the followin code: '...
4
by: Robert E. Flaherty | last post by:
I know that you can call SQL Server from a web service but from within a stored procedure can you call a web service?
2
by: Trevor | last post by:
Argh! This problem is driving me nuts! Can you help? In November of 2003, I installed a web service on Windows Server 2003 built in VB.NET for v1.1.4322 of the framework. It contains a timer...
6
by: archana | last post by:
Hi all, I am executing one stored procedure in windows service. I set sqlcommad's CommandTimeout to 432000 which means 5 days timeout. Still after 11th hour i am getting timeout. I am not...
5
by: James Wong | last post by:
Hi, I am writing a vb.net2005 program that needs to create a stored procedure with SqlServerProject Template. Now, I have two questions for this stored procedure. 1) How can I import and...
0
by: barmatt80 | last post by:
I have been trying to create a web service that calls a stored procedure that will accept one value call the sql stored procedure that returns 4 variables. I haven't done this ever before, and...
12
by: barmatt80 | last post by:
I don't know if this is the right part of the forum. But.... I have been working all night trying to create a web service to call a stored procedure in sql server 2008. The stored procedure calls...
3
by: cmrhema | last post by:
Hi, Kindly excuse if I am posting in the wrong place. I am using Visual Studio 2008, .net framework 3.5, asp.net , c# and sql server 2005. I am supposed to pass stored procedures from client...
3
by: barmatt80 | last post by:
I am stumped on a web service. I have a web service that calls a sql stored procedure. the procedure has 1 input and 20 output paramenters. I can call the stored procedure just fine and it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.