Needed

Needed

Post by Vimal Kakk » Tue, 16 Apr 1996 04:00:00



SSI, a leader in Information Systems, Application developement and
Consulting, currently has opportunities for Software Engineers /
Database Administrators for Sybase with a major Brokerage Houses /
Banks in New York and New Jersey. These positions range from contract
to permanent positions.  Excellent benefits and career growth
potential.

Applicants must be authorized to work in the United States on a full
time basis for any employer. Qualified candidates should e-mail or fax
their resume to the attention of :

    Human Resources
    Software Solutions, Inc.
    50 Broad Street
    New York, Ny 10004

    Voice       : 212 - 480 -2112
    Fax : 212 - 480 -2114


 
 
 

1. Need help with query that needs Dynamic SQL, variables, and Temporary tables

Howdy, all.  Pardon my denseness, apparently I don't know Dynamic SQL
as well as I should.

What I'm trying to do:
Run a stored procedure that, given a table name, will find the
previous Friday's data and stuff it back into the same table for
Saturday and Sunday.

Every table has an asof_date, which is the date the information is
from.

My current code is the following.  The issue I'm running into is that
when I try to start adding variables (i.e. changing getdate() into a
variable so I can run it on Tuesday instead of Monday), things get
rapidly out of control.

The goal is to make this an SP so I can say "exec FridaySP
'mikes_lousy_db'" and have it find the previous friday's data, stuff
Saturday's/Sunday's, and quit.
I know I'm going about it the wrong way, especially after seeing
Erland's page on Dynamic SP, so hopefully someone can help.  Thanks.



--grab Friday's data

        ' where asof_date = convert(char(10), getdate()-3,101)')

--update the asof_date to be Saturday's
update ##FridayInfo
        set asof_date = convert(char(10),getdate()-2,101),
            input_date = getdate()

--insert the updated records

--update the date to be Sunday, now.
update ##FridayInfo set asof_date = convert(char(10),getdate()-2,101)

--insert the updated records

drop table ##FridayInfo

Many thanks!
Michael

2. Mailing Labels from List Box Selections?

3. ADVISE NEEDED: How to migrate :ADVISE NEEDED

4. Memory - I/O's used for update

5. RFI Needed: Programming Tool for MS SQL Server 6.5 Needed

6. DESPERATE FOR HELP!!!

7. NEED HELP WITH SQL SELECT STATEMENT - need to reference cookie info

8. database on a different server using JDBC???

9. USA/MA -- Programmer/Analyst Needed for Prestigious Firm - C, SQL, UNIX, PC/GUI, RDBMS Expertise Needed

10. Locking advice needed - are locking hints needed here?

11. Generator needs to know which datatypes need size etc

12. Need hot standby -- Need Solutions!!!