Click here to Skip to main content
15,894,198 members
Home / Discussions / Database
   

Database

 
GeneralRe: many to many relationship Pin
sangramkp14-Jun-07 2:29
sangramkp14-Jun-07 2:29 
GeneralRe: many to many relationship Pin
Giorgi Dalakishvili14-Jun-07 2:33
mentorGiorgi Dalakishvili14-Jun-07 2:33 
GeneralRe: many to many relationship Pin
sangramkp14-Jun-07 18:59
sangramkp14-Jun-07 18:59 
Question"oledbexception:could not update currently locked". Pin
tomertro14-Jun-07 1:03
tomertro14-Jun-07 1:03 
QuestionTo save a file in a SQL 2005 Pin
Saranya B13-Jun-07 23:44
Saranya B13-Jun-07 23:44 
AnswerRe: To save a file in a SQL 2005 Pin
Colin Angus Mackay14-Jun-07 1:01
Colin Angus Mackay14-Jun-07 1:01 
GeneralRe: To save a file in a SQL 2005 Pin
Giorgi Dalakishvili14-Jun-07 1:53
mentorGiorgi Dalakishvili14-Jun-07 1:53 
QuestionTo get the data from another table... Pin
codingrocks13-Jun-07 23:32
codingrocks13-Jun-07 23:32 
I am doing an application in which i have to retrieve data from multiple tables...

the scenario is like this...

a head_quarter table have state field...as numeric

and a state table hav the same fields....as varchar...

i wanna retrieve the data from head quarter table using stored procedures and the numeric id should be returned to a string...
considering the string then i hav to get the name of the state from state table and put it into the web page...

my stored proc is

--Author: SAJAN A PILLAI

--Created: 9:14 AM 6/14/2007 THURSDAY

CREATE PROCEDURE sp_GetCurrentHQ

(@cid numeric , @organization varchar(100), @hqaddr1 varchar(100), @hqaddr2 varchar(100), @hqcity varchar(50), @hqstate numeric, @hqpin varchar(7), @hqdistrict numeric,@hqplace numeric, @hqphone varchar(100), @hqfax varchar(100), @hqemail varchar(100), @hqwebsite varchar(100), @hqpan varchar(50), @hqtan varchar(50), @hqtin varchar(50),
@hqstatetaxno varchar(50), @hqcentraltaxno varchar(50), @hqfromdate datetime, @todate datetime)
AS
BEGIN
declare @state_name  as varchar(128);
select @state_name =  SHORT_FORM from states  where  ADM1 = '2';
set @st_name=@state_name;

select  OrgName,HqAdd1, HqCity,HqState,HqPin,HqPlace, HqDist, HqPhones ,HqFax,HqEmail,HqWebsite,HqPAN,HqTIN,HqStateTax,HqCentralTax,FromDate,ToDate from HQ where 	FromDate <= getdate() and ToDate >= getdate();

END
GO



please help me

SAJAN A PILLAI

C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE

Questioninvalid objects Pin
manni_n13-Jun-07 22:16
manni_n13-Jun-07 22:16 
AnswerRe: invalid objects Pin
Sylvester george13-Jun-07 22:39
Sylvester george13-Jun-07 22:39 
AnswerRe: invalid objects Pin
Colin Angus Mackay13-Jun-07 23:07
Colin Angus Mackay13-Jun-07 23:07 
QuestionHow to return cursor from stored proc?? Pin
FishiFishi13-Jun-07 22:08
FishiFishi13-Jun-07 22:08 
AnswerRe: How to return cursor from stored proc?? Pin
Tirthadip13-Jun-07 22:36
Tirthadip13-Jun-07 22:36 
AnswerRe: How to return cursor from stored proc?? Pin
N a v a n e e t h14-Jun-07 23:22
N a v a n e e t h14-Jun-07 23:22 
QuestionHow to get top n records Pin
FishiFishi13-Jun-07 22:00
FishiFishi13-Jun-07 22:00 
AnswerRe: How to get top n records Pin
Tirthadip13-Jun-07 22:32
Tirthadip13-Jun-07 22:32 
Questionhow to call a webservice from stored procedure in SQL Server2000? Pin
chronossu13-Jun-07 21:27
chronossu13-Jun-07 21:27 
Questioncreate alias and tables on my pc and copy them with setup or create them in installed pc Pin
upamir13-Jun-07 21:19
upamir13-Jun-07 21:19 
QuestionText datatype not exceeding 8000 characters Pin
Rajiya13-Jun-07 20:51
Rajiya13-Jun-07 20:51 
AnswerRe: Text datatype not exceeding 8000 characters Pin
Krish - KP13-Jun-07 23:21
Krish - KP13-Jun-07 23:21 
AnswerRe: Text datatype not exceeding 8000 characters Pin
Mike Dimmick14-Jun-07 9:20
Mike Dimmick14-Jun-07 9:20 
GeneralRe: Text datatype not exceeding 8000 characters Pin
Rajiya17-Jun-07 18:59
Rajiya17-Jun-07 18:59 
QuestionQuery doubt.....(Urgent need plz hlp me), Pin
Member 387988113-Jun-07 17:55
Member 387988113-Jun-07 17:55 
AnswerRe: Query doubt.....(Urgent need plz hlp me), Pin
andyharman13-Jun-07 23:01
professionalandyharman13-Jun-07 23:01 
GeneralRe: Query doubt.....(Urgent need plz hlp me), Pin
Member 387988113-Jun-07 23:42
Member 387988113-Jun-07 23:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.