not sure on any of the actual coding but could you dateadd -1 day from the first of the following month to give you the last day of the month and assign the last day (day(variable)) to a variable (eg. lastday).
then assign a vairable as 1 (eg. curday)
then do a for loop
for curday to lastday...
Can do this in ASP but i'm struggling to get my head round it here
i want to select from a table if code = 101 (easy)
just two things, how do i refer to fields within a selected record. (it may seem simple but its different to me)
if theres more than one record that match how can i cycle...
Ok, i see where you're coming from here.
I'm thinking two tables,
ie.
table 1
code, description, notes (these being the info i need)
table 2
code, next_code
this way i can have
table 1
100, enter data
101, check data
102, check email
103, etc etc etc
table 2
100, 101
100, 102
so when 100 is...
Unfortunately we have purchased a system, and my job is currently to write that system to do what we need, I have thought about the structure and extra tables, but i cannot change anything major in theirs and I can't change their GUI to view my tables.
Also although there are generally the same...
I have a table that i have all pending tasks held in, there are many different stages with the innitial setup of a client record so there are many triggers on this pending table.
It is already becoming quite a lengthy trigger,
lots of
if CODE = 100
insert this pending for run
if CODE = 101...
Thats brilliant cheers, i'm used to using VBscript statements in ASP, never even touched on @@RowCount before (i have a lot to learn).
Thanks Dave
Theres nothing worse than an idea when its the only one we have!
ASP programmer trying desperately to program in t-SQL!
I want to check if a certain record exists in a table when the trigger runs, just lacking the knowledge (and currently mental capacity as i'm ill) to find the answer.
I have a pending table, as jobs are confirmed (deleted) i am setting up...
Thankyou,
Found them myself about 5 minutes ago by clicking around, boy is my face red!!!
Cheers for the help. Dave
Theres nothing worse than an idea when its the only one we have!
Hi,
as my recent posts may suggest i'm just trying to get to grips with t-sql and i'm trying my hand at most sections.
I am currently trying to get Sql to check my database once a month and setup new pending records accordingly.
I've created my stored procedure, I even managed to schedule my...
Sorry my bad,
What you told me was kind of whet i needed to know, i've just been informed by someone else exactly what i need to do and i've picked that out from your code too (now i know what i need to be looking for in your code, as i said, its all new to me!)
Basically the bit i needed was...
Before you have <%Language=VBScript%> at the top try
<%
response.write "<script LANGUAGE=""JavaScript"">nam1 = """ & nam & """</script>"
%>
This should define the variable in javascript and insert the value of nam into it.
My last...
I need to create many triggers on a table each checking for different things (or i could whack them in one...) but I need to call the same procedure from many tables for many different reasons with only minimal data differences.
Such as we have many status's of records,
If a record ref BI has...
Check you event viewer and see if theres some kind of relevant message to do with SQL in there.
The only time i've had this problem is when i hadn't registered my server correctly! Dave
Theres nothing worse than an idea when its the only one we have!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.