Em Andamento

Dynamic SQL Problem

I have a SQL Database, which has a basic 'Dynamic' database section for our users. I need a SQL Statement/UDF/Cursor combination thereof to Select the fixed field data and the dynamic field data.

This probably does not make sense, I hope a table structure may make some sense:

_tblDatabase_ *--Stores info about the clients 'database'

*DBID (PK) (FK)

ClientID (FK) --Related to Client Table

Name

Description

_tblRecords _ *--Stores the records in 'fixed fields' for databases in tblDatabase

*RecordID (PK)(FK)

DBID (FK) -- Related to tblDatabase

FName

LName

Telephone

...

_tblCustomFields_ *-- Where 'CustomFields' are declared*

FieldID (PK)(FK)

DBID (FK) --Related to tblDatabase

Name

Description

_tblCustomData_ *-- Where the 'Custom Data' Is stored (all fields have a consistant datatype)*

CustomDataID (PK)

RecordID (FK) -- Related tblRecords

FieldID (FK) --Related to tblCustomFields

Data

I need to use a SELECT statement to obtain (for a specifed DBID) the database contents. e.g.:

if, for the sake of example the specified database has two custom fields specified (Sex and DateOfBirth) I would want a table returned as follows:

RecordID,DBID,FName,LName,Telephone,Sex,DOB

1,001,Joe,Bloggs,01234567,Male,01/01/01

2,001,Fred,Smith,09874561,Male,02/02/02

I would preferably want this done in a UDF that returns a Table so I could easily re-use the code

## Deliverables

1) Complete and fully-functional working Stored Procedures, User Defined Functions, Cursors including well commented code

2) Installation package - Not Applicable

3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).

## Platform

MS SQL Server 2000

(running on Win2k)

Habilidades: Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software, SQL

Ver mais: structure stores, statement problem example, statement problem, statement of the problem example, statement of a problem, problem statement example, problem statement, example problem statement, example of statement of the problem, example of problem statement, example of a statement of the problem, example of a problem statement, dynamic problem, data structure problem, components of a problem statement, a problem statement, ms sql client, joe g, structure engineering, fred, engineering dynamic, statement structure sql, sql statement stored, male dynamic, php sql 2000

Acerca do Empregador:
( 2 comentários ) United Kingdom

ID do Projeto: #2995861

Premiar a:

vic123vw

See private message.

$17 USD em 3 dias
(43 Avaliações)
6.9

10 freelancers estão ofertando em média $35 para este trabalho

yenduttjain

See private message.

$8.5 USD in 3 dias
(115 Comentários)
6.6
ekam

See private message.

$59.5 USD in 3 dias
(111 Comentários)
5.7
excellisoft

See private message.

$25.5 USD in 3 dias
(8 Comentários)
5.2
makshe

See private message.

$42.5 USD in 3 dias
(41 Comentários)
4.6
perceivedesigns

See private message.

$55.25 USD in 3 dias
(2 Comentários)
1.6
gikvw

See private message.

$25.5 USD in 3 dias
(0 Comentários)
0.0
jnituch

See private message.

$17 USD in 3 dias
(0 Comentários)
0.0
brazilsoftw

See private message.

$59.5 USD in 3 dias
(1 Comentário)
0.0
fjsilva

See private message.

$38.25 USD in 3 dias
(0 Comentários)
0.0