Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near '.'.
/verslag/MIncSum4.asp, line 9
This is the error i get when running a query.shown below:
line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID = V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit = V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
(V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
(V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
(V_Transaksie.Maand =" & request.form("Maand") & ") AND
(V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
line8:set rstMain = CreateObject("ADODB.Recordset")
9: rstMain.Open sql, _
10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
Source=172.16.4.180",1,4
Any idea what might be cuasing the error?One thing you could try is : extract the sql statement , hard code in some
some values and try to execute in SQL Query Analyzer
--
--
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"amatuer" <njoosub@.gmail.com> wrote in message
news:1149668899.685610.274150@.i39g2000cwa.googlegroups.com...
> Microsoft OLE DB Provider for SQL Server error '80040e14'
> Line 1: Incorrect syntax near '.'.
> /verslag/MIncSum4.asp, line 9
> This is the error i get when running a query.shown below:
> line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
> V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
> V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
> V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID => V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit => V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
> (V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
> (V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
> (V_Transaksie.Maand =" & request.form("Maand") & ") AND
> (V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
> V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
> line8:set rstMain = CreateObject("ADODB.Recordset")
> 9: rstMain.Open sql, _
> 10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
> ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
> Source=172.16.4.180",1,4
> Any idea what might be cuasing the error?
>|||I tried that,it gives the same error in sql server as well.
any other ideas?
Jack Vamvas wrote:
> One thing you could try is : extract the sql statement , hard code in some
> some values and try to execute in SQL Query Analyzer
> --
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
> ___________________________________
>
> "amatuer" <njoosub@.gmail.com> wrote in message
> news:1149668899.685610.274150@.i39g2000cwa.googlegroups.com...
> > Microsoft OLE DB Provider for SQL Server error '80040e14'
> >
> > Line 1: Incorrect syntax near '.'.
> >
> > /verslag/MIncSum4.asp, line 9
> >
> > This is the error i get when running a query.shown below:
> >
> > line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
> > V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
> > V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
> > V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID => > V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit => > V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
> > (V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
> > (V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
> > (V_Transaksie.Maand =" & request.form("Maand") & ") AND
> > (V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
> > V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
> >
> > line8:set rstMain = CreateObject("ADODB.Recordset")
> > 9: rstMain.Open sql, _
> > 10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
> > ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
> > Source=172.16.4.180",1,4
> >
> > Any idea what might be cuasing the error?
> >|||On 7 Jun 2006 01:28:19 -0700, amatuer wrote:
>Microsoft OLE DB Provider for SQL Server error '80040e14'
>Line 1: Incorrect syntax near '.'.
>/verslag/MIncSum4.asp, line 9
>This is the error i get when running a query.shown below:
>line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
>V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
>V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
>V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID =>V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit =>V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
>(V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
>(V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
>(V_Transaksie.Maand =" & request.form("Maand") & ") AND
>(V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
>V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
>line8:set rstMain = CreateObject("ADODB.Recordset")
>9: rstMain.Open sql, _
>10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
>ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
>Source=172.16.4.180",1,4
>Any idea what might be cuasing the error?
Hi amatuer,
The SUM function needs parentheses. So for instance, change
> SELECT Sum V_Transaksie.Aantal As Total,
to
SELECT Sum(V_Transaksie.Aantal) As Total,
And so on for the other totals in the select list.
--
Hugo Kornelis, SQL Server MVP|||that helped. thanx Hugo.
Although my query still nt working the way i want it to...lol
Hugo Kornelis wrote:
> On 7 Jun 2006 01:28:19 -0700, amatuer wrote:
> >Microsoft OLE DB Provider for SQL Server error '80040e14'
> >
> >Line 1: Incorrect syntax near '.'.
> >
> >/verslag/MIncSum4.asp, line 9
> >
> >This is the error i get when running a query.shown below:
> >
> >line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
> >V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
> >V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
> >V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID => >V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit => >V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
> >(V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
> >(V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
> >(V_Transaksie.Maand =" & request.form("Maand") & ") AND
> >(V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
> >V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
> >
> >line8:set rstMain = CreateObject("ADODB.Recordset")
> >9: rstMain.Open sql, _
> >10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
> >ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
> >Source=172.16.4.180",1,4
> >
> >Any idea what might be cuasing the error?
> Hi amatuer,
> The SUM function needs parentheses. So for instance, change
> > SELECT Sum V_Transaksie.Aantal As Total,
> to
> SELECT Sum(V_Transaksie.Aantal) As Total,
> And so on for the other totals in the select list.
> --
> Hugo Kornelis, SQL Server MVP|||On 7 Jun 2006 02:36:57 -0700, amatuer wrote:
>that helped. thanx Hugo.
>Although my query still nt working the way i want it to...lol
Hi amatuer,
I'll be happy to help you further (as I'm sure several others are as
well). But to do that, we do need some more information:
- how do your tables look (please post CREATE TABLE statements,
including all constraints, properties, and indexes. You may omit
irrelevant columns);
- what does your data look like (please post INSERT statements with a
few well-chosen rows of sample data the nicely illustrate your problem);
- how should the results look like (please post expected results, for
example in tabular format - for readability, I suggest using a
fixed-size font and using spaces rather than tabs to layout the table).
Also see www.aspfaq.com/5006 for more tips on information to provide
when asking for help.
--
Hugo Kornelis, SQL Server MVP|||Hugo, i appreciate your willingness to help,but unfortunately i am nt
permitted to give out valuable info.so it seems i will hav to figure it
out by myself.
If i hav any othr questions i will let u know.
Thank you for ur time,it is highly appreciated
Hugo Kornelis wrote:
> On 7 Jun 2006 02:36:57 -0700, amatuer wrote:
> >that helped. thanx Hugo.
> >Although my query still nt working the way i want it to...lol
> Hi amatuer,
> I'll be happy to help you further (as I'm sure several others are as
> well). But to do that, we do need some more information:
> - how do your tables look (please post CREATE TABLE statements,
> including all constraints, properties, and indexes. You may omit
> irrelevant columns);
> - what does your data look like (please post INSERT statements with a
> few well-chosen rows of sample data the nicely illustrate your problem);
> - how should the results look like (please post expected results, for
> example in tabular format - for readability, I suggest using a
> fixed-size font and using spaces rather than tabs to layout the table).
> Also see www.aspfaq.com/5006 for more tips on information to provide
> when asking for help.
> --
> Hugo Kornelis, SQL Server MVP|||On 7 Jun 2006 04:42:01 -0700, amatuer wrote:
>Hugo, i appreciate your willingness to help,but unfortunately i am nt
>permitted to give out valuable info.so it seems i will hav to figure it
>out by myself.
>If i hav any othr questions i will let u know.
>Thank you for ur time,it is highly appreciated
Hi amatuer,
That's a common requirement. One way to work aroound that is to change
the data (and possibly even the table and column names), but keep the
structure intact. That is a bit more work, of course, but it can be
worth it if you're really stuck.
On the other hand, you learn more by figuring it out for yourself :-))
--
Hugo Kornelis, SQL Server MVP|||thanx Hugo, but my prob sorted.took me a while bt i gt it to do wat i
wanted it to do.
Hugo Kornelis wrote:
> On 7 Jun 2006 04:42:01 -0700, amatuer wrote:
> >Hugo, i appreciate your willingness to help,but unfortunately i am nt
> >permitted to give out valuable info.so it seems i will hav to figure it
> >out by myself.
> >If i hav any othr questions i will let u know.
> >Thank you for ur time,it is highly appreciated
> Hi amatuer,
> That's a common requirement. One way to work aroound that is to change
> the data (and possibly even the table and column names), but keep the
> structure intact. That is a bit more work, of course, but it can be
> worth it if you're really stuck.
> On the other hand, you learn more by figuring it out for yourself :-))
> --
> Hugo Kornelis, SQL Server MVP
Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts
Friday, March 23, 2012
Query
Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near '.'.
/verslag/MIncSum4.asp, line 9
This is the error i get when running a query.shown below:
line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID =
V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit =
V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
(V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
(V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
(V_Transaksie.Maand =" & request.form("Maand") & ") AND
(V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
line8:set rstMain = CreateObject("ADODB.Recordset")
9: rstMain.Open sql, _
10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
Source=172.16.4.180",1,4
Any idea what might be cuasing the error?One thing you could try is : extract the sql statement , hard code in some
some values and try to execute in SQL Query Analyzer
--
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"amatuer" <njoosub@.gmail.com> wrote in message
news:1149668899.685610.274150@.i39g2000cwa.googlegroups.com...
> Microsoft OLE DB Provider for SQL Server error '80040e14'
> Line 1: Incorrect syntax near '.'.
> /verslag/MIncSum4.asp, line 9
> This is the error i get when running a query.shown below:
> line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
> V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
> V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
> V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID =
> V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit =
> V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
> (V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
> (V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
> (V_Transaksie.Maand =" & request.form("Maand") & ") AND
> (V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
> V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
> line8:set rstMain = CreateObject("ADODB.Recordset")
> 9: rstMain.Open sql, _
> 10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
> ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
> Source=172.16.4.180",1,4
> Any idea what might be cuasing the error?
>|||I tried that,it gives the same error in sql server as well.
any other ideas?
Jack Vamvas wrote:[vbcol=seagreen]
> One thing you could try is : extract the sql statement , hard code in some
> some values and try to execute in SQL Query Analyzer
> --
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
> ___________________________________
>
> "amatuer" <njoosub@.gmail.com> wrote in message
> news:1149668899.685610.274150@.i39g2000cwa.googlegroups.com...|||Xref: TK2MSFTNGP01.phx.gbl microsoft.public.sqlserver.server:436868
On 7 Jun 2006 01:28:19 -0700, amatuer wrote:
>Microsoft OLE DB Provider for SQL Server error '80040e14'
>Line 1: Incorrect syntax near '.'.
>/verslag/MIncSum4.asp, line 9
>This is the error i get when running a query.shown below:
>line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
>V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
>V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
>V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID =
>V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit =
>V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
>(V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
>(V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
>(V_Transaksie.Maand =" & request.form("Maand") & ") AND
>(V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
>V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
>line8:set rstMain = CreateObject("ADODB.Recordset")
>9: rstMain.Open sql, _
>10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
>ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
>Source=172.16.4.180",1,4
>Any idea what might be cuasing the error?
Hi amatuer,
The SUM function needs parentheses. So for instance, change
> SELECT Sum V_Transaksie.Aantal As Total,
to
SELECT Sum(V_Transaksie.Aantal) As Total,
And so on for the other totals in the select list.
Hugo Kornelis, SQL Server MVP|||that helped. thanx Hugo.
Although my query still nt working the way i want it to...lol
Hugo Kornelis wrote:
> On 7 Jun 2006 01:28:19 -0700, amatuer wrote:
>
> Hi amatuer,
> The SUM function needs parentheses. So for instance, change
>
> to
> SELECT Sum(V_Transaksie.Aantal) As Total,
> And so on for the other totals in the select list.
> --
> Hugo Kornelis, SQL Server MVP|||On 7 Jun 2006 02:36:57 -0700, amatuer wrote:
>that helped. thanx Hugo.
>Although my query still nt working the way i want it to...lol
Hi amatuer,
I'll be happy to help you further (as I'm sure several others are as
well). But to do that, we do need some more information:
- how do your tables look (please post CREATE TABLE statements,
including all constraints, properties, and indexes. You may omit
irrelevant columns);
- what does your data look like (please post INSERT statements with a
few well-chosen rows of sample data the nicely illustrate your problem);
- how should the results look like (please post expected results, for
example in tabular format - for readability, I suggest using a
fixed-size font and using spaces rather than tabs to layout the table).
Also see www.aspfaq.com/5006 for more tips on information to provide
when asking for help.
Hugo Kornelis, SQL Server MVP|||Hugo, i appreciate your willingness to help,but unfortunately i am nt
permitted to give out valuable info.so it seems i will hav to figure it
out by myself.
If i hav any othr questions i will let u know.
Thank you for ur time,it is highly appreciated
Hugo Kornelis wrote:
> On 7 Jun 2006 02:36:57 -0700, amatuer wrote:
>
> Hi amatuer,
> I'll be happy to help you further (as I'm sure several others are as
> well). But to do that, we do need some more information:
> - how do your tables look (please post CREATE TABLE statements,
> including all constraints, properties, and indexes. You may omit
> irrelevant columns);
> - what does your data look like (please post INSERT statements with a
> few well-chosen rows of sample data the nicely illustrate your problem);
> - how should the results look like (please post expected results, for
> example in tabular format - for readability, I suggest using a
> fixed-size font and using spaces rather than tabs to layout the table).
> Also see www.aspfaq.com/5006 for more tips on information to provide
> when asking for help.
> --
> Hugo Kornelis, SQL Server MVP|||On 7 Jun 2006 04:42:01 -0700, amatuer wrote:
>Hugo, i appreciate your willingness to help,but unfortunately i am nt
>permitted to give out valuable info.so it seems i will hav to figure it
>out by myself.
>If i hav any othr questions i will let u know.
>Thank you for ur time,it is highly appreciated
Hi amatuer,
That's a common requirement. One way to work aroound that is to change
the data (and possibly even the table and column names), but keep the
structure intact. That is a bit more work, of course, but it can be
worth it if you're really stuck.
On the other hand, you learn more by figuring it out for yourself :-))
Hugo Kornelis, SQL Server MVP|||thanx Hugo, but my prob sorted.took me a while bt i gt it to do wat i
wanted it to do.
Hugo Kornelis wrote:
> On 7 Jun 2006 04:42:01 -0700, amatuer wrote:
>
> Hi amatuer,
> That's a common requirement. One way to work aroound that is to change
> the data (and possibly even the table and column names), but keep the
> structure intact. That is a bit more work, of course, but it can be
> worth it if you're really stuck.
> On the other hand, you learn more by figuring it out for yourself :-))
> --
> Hugo Kornelis, SQL Server MVP
Line 1: Incorrect syntax near '.'.
/verslag/MIncSum4.asp, line 9
This is the error i get when running a query.shown below:
line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID =
V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit =
V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
(V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
(V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
(V_Transaksie.Maand =" & request.form("Maand") & ") AND
(V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
line8:set rstMain = CreateObject("ADODB.Recordset")
9: rstMain.Open sql, _
10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
Source=172.16.4.180",1,4
Any idea what might be cuasing the error?One thing you could try is : extract the sql statement , hard code in some
some values and try to execute in SQL Query Analyzer
--
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"amatuer" <njoosub@.gmail.com> wrote in message
news:1149668899.685610.274150@.i39g2000cwa.googlegroups.com...
> Microsoft OLE DB Provider for SQL Server error '80040e14'
> Line 1: Incorrect syntax near '.'.
> /verslag/MIncSum4.asp, line 9
> This is the error i get when running a query.shown below:
> line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
> V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
> V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
> V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID =
> V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit =
> V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
> (V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
> (V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
> (V_Transaksie.Maand =" & request.form("Maand") & ") AND
> (V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
> V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
> line8:set rstMain = CreateObject("ADODB.Recordset")
> 9: rstMain.Open sql, _
> 10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
> ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
> Source=172.16.4.180",1,4
> Any idea what might be cuasing the error?
>|||I tried that,it gives the same error in sql server as well.
any other ideas?
Jack Vamvas wrote:[vbcol=seagreen]
> One thing you could try is : extract the sql statement , hard code in some
> some values and try to execute in SQL Query Analyzer
> --
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
> ___________________________________
>
> "amatuer" <njoosub@.gmail.com> wrote in message
> news:1149668899.685610.274150@.i39g2000cwa.googlegroups.com...|||Xref: TK2MSFTNGP01.phx.gbl microsoft.public.sqlserver.server:436868
On 7 Jun 2006 01:28:19 -0700, amatuer wrote:
>Microsoft OLE DB Provider for SQL Server error '80040e14'
>Line 1: Incorrect syntax near '.'.
>/verslag/MIncSum4.asp, line 9
>This is the error i get when running a query.shown below:
>line 5:sql="SELECT Sum V_Transaksie.Aantal As Total, Sum
>V_Transaksie.Prys As TCost, Sum V_Transaksie.Ure As THrs,
>V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag FROM
>V_Transaksie INNER JOIN V_Aktiwiteit ON V_Transaksie.Aktiwiteit_ID =
>V_Aktiwiteit.ID INNER JOIN V_LU_Aktiwiteit ON V_Aktiwiteit.Aktiwiteit =
>V_LU_Aktiwiteit.ID WHERE (V_LU_Aktiwiteit.Function1='External') And
>(V_Transaksie.Afdeling ='" & request.form("Dept") & "') AND
>(V_Transaksie.Invoice IS NOT NULL) AND (V_Transaksie.Invoice = '1') AND
>(V_Transaksie.Maand =" & request.form("Maand") & ") AND
>(V_Transaksie.Jaar =" & request.form("Jaar") & ") Group By
>V_Transaksie.Seksie, V_LU_Aktiwiteit.Aktiwiteitsverslag"
>line8:set rstMain = CreateObject("ADODB.Recordset")
>9: rstMain.Open sql, _
>10: "Provider=SQLOLEDB.1;Persist Security Info=False;User
>ID=sa;password=admin@.sql;Initial Catalog=GIS;Data
>Source=172.16.4.180",1,4
>Any idea what might be cuasing the error?
Hi amatuer,
The SUM function needs parentheses. So for instance, change
> SELECT Sum V_Transaksie.Aantal As Total,
to
SELECT Sum(V_Transaksie.Aantal) As Total,
And so on for the other totals in the select list.
Hugo Kornelis, SQL Server MVP|||that helped. thanx Hugo.
Although my query still nt working the way i want it to...lol
Hugo Kornelis wrote:
> On 7 Jun 2006 01:28:19 -0700, amatuer wrote:
>
> Hi amatuer,
> The SUM function needs parentheses. So for instance, change
>
> to
> SELECT Sum(V_Transaksie.Aantal) As Total,
> And so on for the other totals in the select list.
> --
> Hugo Kornelis, SQL Server MVP|||On 7 Jun 2006 02:36:57 -0700, amatuer wrote:
>that helped. thanx Hugo.
>Although my query still nt working the way i want it to...lol
Hi amatuer,
I'll be happy to help you further (as I'm sure several others are as
well). But to do that, we do need some more information:
- how do your tables look (please post CREATE TABLE statements,
including all constraints, properties, and indexes. You may omit
irrelevant columns);
- what does your data look like (please post INSERT statements with a
few well-chosen rows of sample data the nicely illustrate your problem);
- how should the results look like (please post expected results, for
example in tabular format - for readability, I suggest using a
fixed-size font and using spaces rather than tabs to layout the table).
Also see www.aspfaq.com/5006 for more tips on information to provide
when asking for help.
Hugo Kornelis, SQL Server MVP|||Hugo, i appreciate your willingness to help,but unfortunately i am nt
permitted to give out valuable info.so it seems i will hav to figure it
out by myself.
If i hav any othr questions i will let u know.
Thank you for ur time,it is highly appreciated
Hugo Kornelis wrote:
> On 7 Jun 2006 02:36:57 -0700, amatuer wrote:
>
> Hi amatuer,
> I'll be happy to help you further (as I'm sure several others are as
> well). But to do that, we do need some more information:
> - how do your tables look (please post CREATE TABLE statements,
> including all constraints, properties, and indexes. You may omit
> irrelevant columns);
> - what does your data look like (please post INSERT statements with a
> few well-chosen rows of sample data the nicely illustrate your problem);
> - how should the results look like (please post expected results, for
> example in tabular format - for readability, I suggest using a
> fixed-size font and using spaces rather than tabs to layout the table).
> Also see www.aspfaq.com/5006 for more tips on information to provide
> when asking for help.
> --
> Hugo Kornelis, SQL Server MVP|||On 7 Jun 2006 04:42:01 -0700, amatuer wrote:
>Hugo, i appreciate your willingness to help,but unfortunately i am nt
>permitted to give out valuable info.so it seems i will hav to figure it
>out by myself.
>If i hav any othr questions i will let u know.
>Thank you for ur time,it is highly appreciated
Hi amatuer,
That's a common requirement. One way to work aroound that is to change
the data (and possibly even the table and column names), but keep the
structure intact. That is a bit more work, of course, but it can be
worth it if you're really stuck.
On the other hand, you learn more by figuring it out for yourself :-))
Hugo Kornelis, SQL Server MVP|||thanx Hugo, but my prob sorted.took me a while bt i gt it to do wat i
wanted it to do.
Hugo Kornelis wrote:
> On 7 Jun 2006 04:42:01 -0700, amatuer wrote:
>
> Hi amatuer,
> That's a common requirement. One way to work aroound that is to change
> the data (and possibly even the table and column names), but keep the
> structure intact. That is a bit more work, of course, but it can be
> worth it if you're really stuck.
> On the other hand, you learn more by figuring it out for yourself :-))
> --
> Hugo Kornelis, SQL Server MVP
Wednesday, March 21, 2012
Queries??
I'm confused.
I am creating a interaction application for alton towers available through a website (using asp.net). This website is connected to a database(sql server 2000) containing infomation on different shops, rides, restaurants and facilities at the park.
I have inputted data to my database. The user should be able to do searches such as:
rides (and shops or all) available in a certain area.
rides in a certain area above a certain height rescrictions.
etc
I'm confused. I have used SQL statements before and I know it is possible to retrieve this information from the database, but how should I go about this and how should I be storing this information so that I am able to call it from the front teir.
I have read up on views, stored procedures and triggers and I'm a bit lost. Should I be creating all the possible queries and then store them as a view (or stored procedure) I thought I would just have to write a sql statement but it seems a lot more confusing...
and what about triggers and user defined statements??
PLEASE help, I have a deadline in a week : (
THANK YOUOriginally posted by asbirpam
I have a deadline in a week : (
Not much time for QA, huh...
Use stored procedures
CREATE PROC mySproc99
@.key int
AS
SELECT Col_list* FROM myTable99 WHERE Key = myKey99**
GO
EXEC mySproc99 value
GO
* Supply the columns you need from the table
** Supply the name of the key colmn and the value you need to select...
Good luck...
Come back with more specific info if you need help
I am creating a interaction application for alton towers available through a website (using asp.net). This website is connected to a database(sql server 2000) containing infomation on different shops, rides, restaurants and facilities at the park.
I have inputted data to my database. The user should be able to do searches such as:
rides (and shops or all) available in a certain area.
rides in a certain area above a certain height rescrictions.
etc
I'm confused. I have used SQL statements before and I know it is possible to retrieve this information from the database, but how should I go about this and how should I be storing this information so that I am able to call it from the front teir.
I have read up on views, stored procedures and triggers and I'm a bit lost. Should I be creating all the possible queries and then store them as a view (or stored procedure) I thought I would just have to write a sql statement but it seems a lot more confusing...
and what about triggers and user defined statements??
PLEASE help, I have a deadline in a week : (
THANK YOUOriginally posted by asbirpam
I have a deadline in a week : (
Not much time for QA, huh...
Use stored procedures
CREATE PROC mySproc99
@.key int
AS
SELECT Col_list* FROM myTable99 WHERE Key = myKey99**
GO
EXEC mySproc99 value
GO
* Supply the columns you need from the table
** Supply the name of the key colmn and the value you need to select...
Good luck...
Come back with more specific info if you need help
Tuesday, March 20, 2012
Queried default values
Hello!
Iâ'm using reporting services in a web application. I have made my own user
interface (asp.net / c#) it works rather well except handling queried default
values.
Iâ'm using Stored Procedures to get the default values (non-queried default
values are no problem). The available values are selected the same way
without problems. The SP to get the default and valid values are using one of
the report parameters as a parameter and it works fine using the report
manager.
ReportParams = rs.GetReportParameters(ReportPath,null,true,ParamValues,null);
Above returns NULL or empty default values.
Can anyone help me how to handle queried default values?
If anyone is familiar with my problem, please reply with a solution.
Best Regards,
daniel_bI've done this in vb.net, and it works without problems. Are you sure
you are using the web service correctly?
I set the ParamValues parameter to be Nothing (null) if I have no known
parameter values yet, or to be an array of ParameterValues (with
prompt, name and value set) if I already know the value of some of the
parameters. I sometimes know the value of some parameters when I am
dealing with dependant parameters where the list of values for one
parameter is not known until another parameter has its value set.
ParameterList = service.GetReportParameters(ReportName, Nothing,
True, values, Nothing)
Does this help?
Kulgan.
Iâ'm using reporting services in a web application. I have made my own user
interface (asp.net / c#) it works rather well except handling queried default
values.
Iâ'm using Stored Procedures to get the default values (non-queried default
values are no problem). The available values are selected the same way
without problems. The SP to get the default and valid values are using one of
the report parameters as a parameter and it works fine using the report
manager.
ReportParams = rs.GetReportParameters(ReportPath,null,true,ParamValues,null);
Above returns NULL or empty default values.
Can anyone help me how to handle queried default values?
If anyone is familiar with my problem, please reply with a solution.
Best Regards,
daniel_bI've done this in vb.net, and it works without problems. Are you sure
you are using the web service correctly?
I set the ParamValues parameter to be Nothing (null) if I have no known
parameter values yet, or to be an array of ParameterValues (with
prompt, name and value set) if I already know the value of some of the
parameters. I sometimes know the value of some parameters when I am
dealing with dependant parameters where the list of values for one
parameter is not known until another parameter has its value set.
ParameterList = service.GetReportParameters(ReportName, Nothing,
True, values, Nothing)
Does this help?
Kulgan.
Subscribe to:
Posts (Atom)