borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (ADO malfunction???)Next Topic (Delete specfic record Query???) New Topic New Poll Post Reply
AndreaVB Forum : Database : fomular in table SQL
Poster Message
luckyboy
Level: VB Lord

Registered: 05-05-2005
Posts: 160

icon fomular in table SQL

I have two tables(Table1 and Table2).
property Table1
IDTest1     int
IDTest2     int

Property Table2
IDTest3     int
IDF           (formular)


can i used field IDTest2 in table1 in the formular in the table2?
many thank for your help




____________________________
Please help out.

25-10-2006 at 08:27 AM
View Profile Send Email to User Show All Posts | Quote Reply
admin
Level: Administrator


Registered: 04-04-2002
Posts: 530
icon Re: fomular in table SQL

are you using SQl server? what do you mean with (formular)...what kind of datatype is this? and what do you want to do with fields in table1 relating to table2?

____________________________
AndreaVB

25-10-2006 at 08:32 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
luckyboy
Level: VB Lord

Registered: 05-05-2005
Posts: 160
icon Re: fomular in table SQL

Im using SQL server. I just want to use select in field in IDTest1 to apply in IDF. more please?

____________________________
Please help out.

____________________________
Attached:
untitled.jpg 10 KB (Downloads: 1)

26-10-2006 at 04:00 AM
View Profile Send Email to User Show All Posts | Quote Reply
admin
Level: Administrator


Registered: 04-04-2002
Posts: 530
icon Re: fomular in table SQL

Computed fields can only be based upon fields of their table and cannot include aggregate functions. Computed fields are restricted to he fields of the current record and cannot be float and the function has to be deterministic. if you need to use a field of another table to create a computed field I suggest you to create a view. If you show us some example of fields and formulas you need to use I can help you write your view

please let me know

____________________________
AndreaVB

26-10-2006 at 06:17 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
luckyboy
Level: VB Lord

Registered: 05-05-2005
Posts: 160
icon Re: fomular in table SQL

example: Table2.IDF =Table1.IDTest1*Table2.IDTest3
many thank for your help.

____________________________
Please help out.

27-10-2006 at 01:37 AM
View Profile Send Email to User Show All Posts | Quote Reply
admin
Level: Administrator


Registered: 04-04-2002
Posts: 530
icon Re: fomular in table SQL

ok, but what record of Table1 should be multiplied with record in Table2? don't you have a ID that connects a record from table1 with a single record in table2? how many records you have in the two tables? suppose we have the following records:

Table1
IDTest1     IDTest2
1               7
5               6
40             1

and Table2
IDTest3     IDF
4
3
1

how can we link a record into Table1 with a single record in Table2?

____________________________
AndreaVB

27-10-2006 at 06:12 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : Database : fomular in table SQL
Previous Topic (ADO malfunction???)Next Topic (Delete specfic record Query???) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder