Click here to Skip to main content
15,885,244 members
Home / Discussions / Database
   

Database

 
GeneralRe: A loop in T-SQL ? Pin
Sebastien Lachance16-Nov-04 9:54
Sebastien Lachance16-Nov-04 9:54 
GeneralRe: A loop in T-SQL ? Pin
Colin Angus Mackay16-Nov-04 10:04
Colin Angus Mackay16-Nov-04 10:04 
GeneralDELETE X WHERE Y IN (SubQuery) Problem Pin
Tristan Rhodes16-Nov-04 0:55
Tristan Rhodes16-Nov-04 0:55 
GeneralRe: DELETE X WHERE Y IN (SubQuery) Problem Pin
Colin Angus Mackay16-Nov-04 1:38
Colin Angus Mackay16-Nov-04 1:38 
GeneralRe: DELETE X WHERE Y IN (SubQuery) Problem Pin
Tristan Rhodes16-Nov-04 3:17
Tristan Rhodes16-Nov-04 3:17 
GeneralRe: DELETE X WHERE Y IN (SubQuery) Problem Pin
Colin Angus Mackay16-Nov-04 5:46
Colin Angus Mackay16-Nov-04 5:46 
QuestionHow to import both adoce31.dll & adoxce31.dll? Pin
george ivanov16-Nov-04 0:53
george ivanov16-Nov-04 0:53 
GeneralDeclare Varibales In SQL 2000 Pin
Hemant Mane15-Nov-04 19:03
Hemant Mane15-Nov-04 19:03 
Hi friends
I make a function in sql 2000. I pass One parameter to that function and i return a table from that function
i have 3 different tables. 1 is master table.

e.g

i have table of doctor i.e master
and another 2 are 1 is specialization and another is status in specialization there are specialities of doctror like GP, Physician etc and in status the status of doctor is Important and very Important etc

I want result like this
Important very Important

GP 4 5
Phy 3 2


first row indicate 4 Gp doctors are important and 5 are very important

i make a function to return this result

but i dont know how many Specialities in table
and how many status

so i want to alter temperory table in the function

create function abc(@docid)
returns table @tab (no varchar(10))
as
begin
declare @spec varchar(20)
declare @vis varchar(20)
declare @no int
declare @ctr int
select @ctr = count(visittypeid) from doc_visitytype where visitytypeid <> 0
while (@ctr >= 0)
begin
select @vis = visittype from doc_visittype where visittypeid = @ctr
ALTER TABLE @tab
ADD @vis varchar(10)
end
return

end



this code add the columns in the temporary table
but @vis is local veriable how can i assign a veriable that it should take value of @vis as a coloumn name


Thank You
GeneralSequential Dates and Grouping Pin
Peet Schultz15-Nov-04 2:47
Peet Schultz15-Nov-04 2:47 
GeneralRe: Sequential Dates and Grouping Pin
Michael Potter15-Nov-04 3:33
Michael Potter15-Nov-04 3:33 
GeneralRe: Sequential Dates and Grouping Pin
Peet Schultz15-Nov-04 4:11
Peet Schultz15-Nov-04 4:11 
GeneralRe: Sequential Dates and Grouping Pin
Michael Potter15-Nov-04 8:10
Michael Potter15-Nov-04 8:10 
GeneralGenerate SQL Script ( store procedure problem) Pin
manxx14-Nov-04 8:40
manxx14-Nov-04 8:40 
GeneralView all Tables in database Pin
visitsaadi13-Nov-04 1:33
visitsaadi13-Nov-04 1:33 
GeneralRe: View all Tables in database Pin
Colin Angus Mackay13-Nov-04 1:51
Colin Angus Mackay13-Nov-04 1:51 
QuestionSelect Top 10 from a DataTable ??? Pin
luckyShek12-Nov-04 9:56
luckyShek12-Nov-04 9:56 
GeneralStored Procedures Pin
Anonymous12-Nov-04 6:02
Anonymous12-Nov-04 6:02 
GeneralRe: Stored Procedures Pin
Colin Angus Mackay12-Nov-04 6:41
Colin Angus Mackay12-Nov-04 6:41 
GeneralRe: Stored Procedures Pin
Anonymous14-Nov-04 22:38
Anonymous14-Nov-04 22:38 
QuestionHow to back up database on remote computer?? Pin
venadder12-Nov-04 5:07
venadder12-Nov-04 5:07 
GeneralConnection String for Connection to OLAP Server Pin
mysorian11-Nov-04 16:50
professionalmysorian11-Nov-04 16:50 
GeneralRe: Connection String for Connection to OLAP Server Pin
David Salter11-Nov-04 23:47
David Salter11-Nov-04 23:47 
GeneralFrom a Blob to some type of image in Java Pin
Red Sunday11-Nov-04 9:39
Red Sunday11-Nov-04 9:39 
GeneralInserting Pin
eggie511-Nov-04 8:45
eggie511-Nov-04 8:45 
GeneralRe: Inserting Pin
Colin Angus Mackay11-Nov-04 9:12
Colin Angus Mackay11-Nov-04 9:12 

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.