Hello all,
My bad, i should have mentioned it, am working on postgres. If anyone has used table as a columns datatype I would be glad to hear from you if you could tell me when to go for such an option.
Cheers
User Profile
Collapse
-
table name as a column datatype
Hello all
Recently I was playing with column data types and found that you can have a table name as the column's datatype although it looks like an "array object". For ex. if I have table1 and table2, it seems something like the following is possible..
create table table2(id bigint,table1[]);
Am just interested in what are the situations one would go for such an option? Any example or a direction... -
exactly now i have added status check and its working fine now.
Thanks for your help, much appreciated.
CheersLeave a comment:
-
sorry my bad, i have it as an integer not like the previous post.
xmlObj.readySta te == 4
(integer).Leave a comment:
-
Problem sorted,
" xmlObj.readySta te == "4" || xmlObj.readySta te=="complete" "
This is the line that had the problem. The readyState receives only a numeric response and no string. So this was breaking the script here when i compare readyState to "Complete" and was returning an empty responseText all the time. So when i tried to split responseText and add it to the div elements...Leave a comment:
-
I tried nulling the xmlhttp object, but still remains the same. I dont really understand how the error gets triggered. Not all the table cells show undefined, only two columns does that. The other column which is also updated with the AJAX response goes blank instead of saying undefined. There are no differences between these columns though. I cant think of a reason why firefox would do it... any suggestions??Leave a comment:
-
I dont think FireBug is the issue in my case, as it shows 'undefined' even in other boxes with no firebug on.Leave a comment:
-
Cool, thanks a lot. I would have a go at it and let you know. Appreciate the time you had spent on this.
CheersLeave a comment:
-
-
once you click the button 'Create Report' you will be inside the report center. Once you are are inside the report center, click on any link just to navigate away from the page. When you click on the link the the table cells which were saying 'Loading' would disappear and you will see 'undefined' appearing in those cells for a very brief time before you end up in the next page.Please let me know if you were able to reproduce it this time. Thanks...Leave a comment:
-
Is it possible i can email you my test site?? I dont want it to be public
Thanks again...Leave a comment:
-
Thanks for your reply, The ajaxrequest is triggered by the following functions
...Code:function getReportStatus(geturl) { var columnvals; var filtervals; url = geturl; xmlObj = null; xmlObj = GetXmlObj(); // This function is to choose the right xmlhttp object according to the browser xmlObj.onreadystatechange=stateChanged; xmlObj.open("GET",Leave a comment:
-
Firefox - 'undefined' error
I have a page with table layout which has an AJAX request sent on body onLoad event, during this time the table cells show static text like "Loading". The table cells are later updated with the AJAX response. So when I try to move out of the page once the AJAX request is sent by clicking on a link for exmple, the "Loading" changes to "undefined" . I read that innerHTML is not supported by firefox for table cells so i... -
Thanks again for your reply rski.
The function you had posted is a cool work around although I get the following error ,
Syntax error at or near ","
insert into matrix_10 values(2,,,,,,, 2007,19,10,,,,, ,,,,,,name,,,,, ,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,, ,,,,,,,)
I guess its because record type is looking for data for all columns..?? Or is it me overlooking something?
CheersLeave a comment:
-
Thanks for your resply rski. I was having a play with it and figured out the following works,
[CODE=sql]CREATE OR REPLACE FUNCTION matrix_test_ins ert_trigger()
RETURNS trigger AS $$
BEGIN
EXECUTE 'INSERT INTO matrix_' || NEW.month || '(id,accept,day ,month,year) values(' || NEW.id ||,'''|| NEW.accept ||''',|| NEW.day ||,|| NEW.month ||,|| NEW.year||')';
RETURN NULL;
END;
$$ LANGUAGE...Leave a comment:
-
pl/pgsql triggers - Problem with NEW.*
Hello there
I have been trying to generate a dynamic querystring thats to be executed inside a trigger function and every time I use NEW.* pl/pgsql throws an error saying 'column * does not exist'.
...Code:CREATE OR REPLACE FUNCTION matrix_test_insert_trigger() RETURNS trigger AS $$ BEGIN EXECUTE 'INSERT INTO matrix_' || NEW.month || '(id,accept,day,month,year) values -
-
Does someone have an answer for it? Please let me know as am designing my classes and it depends on this now.
Thanks a lotLeave a comment:
-
Prepared Statement for IN function
Could anyone please tell me if it is possible to use prepared statement in postgresql for IN function? if its possible then hows it done? What I want to have would look something like this,
prepare my_query as
select something from sometable
where some_column IN ($1);
execute my_query('looku p_value','looku p_value','looku p_value')
Please let me know how this could be achieved in Postgresql,
... -
Error!!!! Sort Dictionary Object Using the Value
Hello there
Iam stuck trying to sort the dictionary object in classic asp. Am trying to sort by the values of the dictionary object and not using keys, and once sorted by values i need the keys according to the sorted values. The new order of keys would then be used to fetch records from DB. Hope am clear. if i can do something like that without using multidimensiona l arrays I'd be glad. Could anyone here please shed some light..???...
No activity results to display
Show More
Leave a comment: