SQLTeam.com | Weblogs | Forums

Need tp write the SP for the below Spec , i am new to the SP


#1

Used in “BASIC” searching to aggregate results across multiple class IDs into a unified results list,
returns the key value (timestamp) for the record list in the temp table
4.2.2 Input Parameters
4.2.2.1 Array of USER ID (_S variant only) / CLASS ID / COLUMN NAME / SEARCH value to use in
a WHERE clause
4.2.3 Output Parameters – Success
4.2.3.1 Key value (timestamp)
4.2.4 Output Parameters – Failure
4.2.4.1 Null key value
4.2.5 General process
4.2.5.1 Create a key value (TIMESTAMP) to use to aggregate results
4.2.5.2 For each individual CLASS ID in the input array
4.2.5.2.1 Loop through the input records, building a string to use as a WHERE clause,
in the format of ‘WHERE [COLUMN NAME] = [SEARCH VALUE] AND…’
4.2.5.2.2 Run SELECT DISTINCT statement selecting DnCDH_ROW_ID to build the
array of matching ROW ID and CLASS ID and write to temp table D2TT_RCS
using the Key Value
4.2.5.3 At the end of all loops
4.2.5.3.1 Create another key value (timestamp)
4.2.5.3.2 Perform a SELECT DISTINCT INTO on the temp table, inserting array of ROW
ID / CLASS ID /SECURITY ID to remove all duplicates, and then delete the
original rows, and return the new key value
4.2.5.4 _S variant only:
4.2.5.4.1 Submit the temporary table array of ROW ID and CLASS ID to the SCMI
security check SP D2SP_SCMISec_TT
4.2.5.4.2 SCMI security check will delete non-matching records and assign security
values to the remaining records
4.2.5.4.3 Create another key value (timestamp)
4.2.5.4.4 Perform a SELECT DISTINCT INTO on the temp table, inserting array of ROW
ID / CLASS ID /SECURITY ID to remove all duplicates, and then delete the
original rows, and return the new key value

Thanks in advance


#2

Why are you taking a class in SQL if you aren't going to try to learn SQL?

Had you at least made an attempt, anyone here would have been more than happy to help you work through any errors, provide guidance or answer specific questions... That's what this community does... We are, however, NOT a free cheat on your homework service.


#3

Hmmm ... I thought this was a business process spec, not a class, but your point still applies - actually more worrying if person is employed to do this stuff and doesn't know where to start ...

Either way, I find the SPEC worrying ... "LOOP" and all that "Create another key value (timestamp)" stuff


#4

Guys , Sorry for this ..

Actually currently i working as a SQL administration side, i don't know much knowledge in the SQL programming .

but , i have received the below spec in my new project and need do to that. seriously i don't know where to start how to start on this . i didn't get any help from my management. so if i get any help or related links which is very helpful to me.

i will not try to cheat anyone. just i need an idea and help of you guys.

thanks


#5

In that case it seems to me that you should not be being asked to do this?

This isn't a problem with a simple solution that you could be expected to self-teach ... it reads to me like the programmer would need to know all sorts of company-specific inter-related stuff (such as "SCMI security check will delete non-matching records and assign security values to the remaining records"), but also require the programmer to have sufficient skills for the complexity of SQL that would be required to solve this.

By your own admission you don't have those skills.

I can't imagine that anyone here is going to help with this, it would take way too much time and because you have no skills it would require teaching rather than just "nudging in the right direction". If your company doesn't have resources for this job then they need to hire someone


#6

I'm all for clear specifications in a BRD, but everyone that I've ever touched has been, "this is what the finished product needs to be"... I've never had one that actually said, "write the t-sql like this"... See new thing every day...


#7

Thanks Guys . i will try to learn and understand the specs and try to do .. Once i done any sample code .. i will submit for your review , please help at the time.

Thanks again.