473,505 Members | 13,925 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing Query to change the way that the data is presented

22 New Member
Hi

We are attempting to create a dynamic spreadsheet which will extract information from CRM / SQL.

We have very limited expierence in creating SQL queries and we would really appreciate any assistance. We had some assistance in creating an initial query which looked as follows:

SELECT equipment.name ,
equipment.new_modelno,
equipment.new_serialno ,
equipment.new_type ,
equipment.new_make,
equipment.new_mast,
equipment.new_capacity,
activitypartycustomer.partyidname,
serviceappointment.scheduledstart,
serviceappointment.scheduledend
FROM FilteredEquipment AS equipment
INNER JOIN FilteredActivityParty AS activityparty
ON equipment.equipmentid = partyid
INNER JOIN FilteredServiceAppointment AS
serviceappointment
ON serviceappointment.activityid =
activityparty.activityid
INNER JOIN FilteredActivityParty AS activitypartycustomer
ON serviceappointment.activityid =
activitypartycustomer.activityid AND
activitypartycustomer.participationtypemask = 11
WHERE (serviceappointment.statecode = 0)
ORDER BY equipment.name

This query gave us exactly the information we wanted however we noticed that a resource which has been scheduled more than once appears twice on the report on a second row.

We would prefer for the resource to be listed once and the additonal service activity details to appear in additional columns on the report.

For example, we would have equipment name, equipment model, equipment make, equipment serial number, customer name for service activity 1, dates for service activity 1, customer name for service activity 2 and the dates for service activity 2. All these fields would appear as columns and the full detail would not be repeated in a second row.

For example
Equipment Name Equipment SerialNo Customer Start Date End Date
E15 3232 ABC Shoes 15-01-2007 30-06-2007
E15 3232 ABC Shoes 01-08-2007 30-04-2007
AS

EquipName EquipSerialNo Cust Start Date End Date Cust Start Date End Date
E15,3232,ABC Shoes,5-01-2007,30-06-2007,ABC Shoes,1-08-2007,30-04-2007

Is this possible to achieve? Can we edit the query in some way to give us
the required information?

Really appreciate any assistance. .

Thanks alot
Mark
Oct 8 '07 #1
28 2390
azimmer
200 Recognized Expert New Member
Hi

We are attempting to create a dynamic spreadsheet which will extract information from CRM / SQL.

We have very limited expierence in creating SQL queries and we would really appreciate any assistance. We had some assistance in creating an initial query which looked as follows:

SELECT equipment.name ,
equipment.new_modelno,
equipment.new_serialno ,
equipment.new_type ,
equipment.new_make,
equipment.new_mast,
equipment.new_capacity,
activitypartycustomer.partyidname,
serviceappointment.scheduledstart,
serviceappointment.scheduledend
FROM FilteredEquipment AS equipment
INNER JOIN FilteredActivityParty AS activityparty
ON equipment.equipmentid = partyid
INNER JOIN FilteredServiceAppointment AS
serviceappointment
ON serviceappointment.activityid =
activityparty.activityid
INNER JOIN FilteredActivityParty AS activitypartycustomer
ON serviceappointment.activityid =
activitypartycustomer.activityid AND
activitypartycustomer.participationtypemask = 11
WHERE (serviceappointment.statecode = 0)
ORDER BY equipment.name

This query gave us exactly the information we wanted however we noticed that a resource which has been scheduled more than once appears twice on the report on a second row.

We would prefer for the resource to be listed once and the additonal service activity details to appear in additional columns on the report.

For example, we would have equipment name, equipment model, equipment make, equipment serial number, customer name for service activity 1, dates for service activity 1, customer name for service activity 2 and the dates for service activity 2. All these fields would appear as columns and the full detail would not be repeated in a second row.

For example
Equipment Name Equipment SerialNo Customer Start Date End Date
E15 3232 ABC Shoes 15-01-2007 30-06-2007
E15 3232 ABC Shoes 01-08-2007 30-04-2007
AS

EquipName EquipSerialNo Cust Start Date End Date Cust Start Date End Date
E15,3232,ABC Shoes,5-01-2007,30-06-2007,ABC Shoes,1-08-2007,30-04-2007

Is this possible to achieve? Can we edit the query in some way to give us
the required information?

Really appreciate any assistance. .

Thanks alot
Mark
Yes it is but far from trivial. If you use SQL Server 2005 you can use the PIVOT functionality ( http://technet.microsoft.com/en-us/library/ms177410.aspx ); either way the following page is worth reading: http://www.mssqltips.com/tip.asp?tip=937
Oct 8 '07 #2
Mark Braithwaite
22 New Member
Yes it is but far from trivial. If you use SQL Server 2005 you can use the PIVOT functionality ( http://technet.microsoft.com/en-us/library/ms177410.aspx ); either way the following page is worth reading: http://www.mssqltips.com/tip.asp?tip=937
Hi

Thanks alot for your reply. As least I have an idea as to how this can be done. We have very limited experience in writing SQL Queries and it seems as though we have to write quite a complex query to get the results we need. I have written the following query:

SELECT <equipment.name>
partyidname AS Customer
scheduledstart AS Scheduled Start
scheduledend AS Scheduled End
FROM
(equipment.name) AS Sourcetable
FROM
SELECT equipment.name ,
equipment.new_modelno,
equipment.new_serialno ,
equipment.new_type ,
equipment.new_make,
equipment.new_mast,
equipment.new_capacity,
activitypartycustomer.partyidname,
serviceappointment.scheduledstart,
serviceappointment.scheduledend
FROM FilteredEquipment AS equipment
INNER JOIN FilteredActivityParty AS activityparty
ON equipment.equipmentid = partyid
INNER JOIN FilteredServiceAppointment AS
serviceappointment
ON serviceappointment.activityid =
activityparty.activityid
INNER JOIN FilteredActivityParty AS activitypartycustomer ON
serviceappointment.activityid =
activitypartycustomer.activityid AND
activitypartycustomer.participationtypemask = 11
AS Sourcetable
PIVOT
(equipment.name)
IN (partyidname,
scheduledstart,
scheduledend)
AS
Sourcetable

I will be testing this query shortly and I very much doubt that it is going to work one hundered percent.

Is there anything that you notice immediately that is wrong with this query.

Thanks
Oct 8 '07 #3
iburyak
1,017 Recognized Expert Top Contributor
Hello I don’t give you a guaranty that it would work because I have no way of testing this query. Also this query would work only if you have not more than 2 activities because with assumption of two I go for first selecting MIN and last selecting MAX which is not the same as MIN nothing in between will be available in this type of query and if you think that you have cases where you have more then 2 customers stick to your original query otherwise it will need serious programming like looping through the data and pivoting it.

[PHP]

SELECT name, new_modelno, new_serialno, new_type, new_make, new_mast, new_capacity,
(select partyidname from FilteredActivityParty where activityid = Activity1 AND activitypartycustomer.participationtypemask = 11) partyidname1,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity1) scheduledstart1,
(select scheduledend from FilteredServiceAppointment where activityid = Activity1) scheduledend1,

(select partyidname from FilteredActivityParty where activityid = Activity2 AND Activity2 <> Activity1 AND activitypartycustomer.participationtypemask = 11) partyidname2,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledstart2,
(select scheduledend from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledend2,
FROM (
SELECT equipment.name name ,
equipment.new_modelno new_modelno,
equipment.new_serialno new_serialno,
equipment.new_type new_type,
equipment.new_make new_make,
equipment.new_mast new_mast,
equipment.new_capacity new_capacity,
min(serviceappointment.activityid) Activity1,
max(serviceappointment.activityid) Activity2
FROM FilteredEquipment AS equipment
INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid
INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid
WHERE (serviceappointment.statecode = 0)
group by equipment.name ,
equipment.new_modelno,
equipment.new_serialno ,
equipment.new_type ,
equipment.new_make,
equipment.new_mast,
equipment.new_capacity) a

ORDER BY equipment.name [/PHP]

Good Luck.
Oct 8 '07 #4
Mark Braithwaite
22 New Member
Hello I don’t give you a guaranty that it would work because I have no way of testing this query. Also this query would work only if you have not more than 2 activities because with assumption of two I go for first selecting MIN and last selecting MAX which is not the same as MIN nothing in between will be available in this type of query and if you think that you have cases where you have more then 2 customers stick to your original query otherwise it will need serious programming like looping through the data and pivoting it.

[PHP]

SELECT name, new_modelno, new_serialno, new_type, new_make, new_mast, new_capacity,
(select partyidname from FilteredActivityParty where activityid = Activity1 AND activitypartycustomer.participationtypemask = 11) partyidname1,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity1) scheduledstart1,
(select scheduledend from FilteredServiceAppointment where activityid = Activity1) scheduledend1,

(select partyidname from FilteredActivityParty where activityid = Activity2 AND Activity2 <> Activity1 AND activitypartycustomer.participationtypemask = 11) partyidname2,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledstart2,
(select scheduledend from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledend2,
FROM (
SELECT equipment.name name ,
equipment.new_modelno new_modelno,
equipment.new_serialno new_serialno,
equipment.new_type new_type,
equipment.new_make new_make,
equipment.new_mast new_mast,
equipment.new_capacity new_capacity,
min(serviceappointment.activityid) Activity1,
max(serviceappointment.activityid) Activity2
FROM FilteredEquipment AS equipment
INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid
INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid
WHERE (serviceappointment.statecode = 0)
group by equipment.name ,
equipment.new_modelno,
equipment.new_serialno ,
equipment.new_type ,
equipment.new_make,
equipment.new_mast,
equipment.new_capacity) a

ORDER BY equipment.name [/PHP]

Good Luck.
Hi

Thanks so much for your help. As you can probably tell this type of query is what we consider to be quite complex and is way behind our scope. So we really appreciate your assistance.

There may be situations where we will have more than one service activity however there should never be more than two so this is fine. We will definitely have more than two customers.

I tested your Query in a virtual image and we received the following error message. Incorrect Syntax near the keyword 'FROM'
Incorrect Syntax near 'a'
Statement(s) could not be prepared.

I removed the 'a' from the end of the query as I thought this may have been inserted incorrrectly and we received the following error: Incorrect Syntax near the keyword 'FROM'.

If you have any ideas, please let us know.

Thanks again
Oct 9 '07 #5
Mark Braithwaite
22 New Member
Hello I don’t give you a guaranty that it would work because I have no way of testing this query. Also this query would work only if you have not more than 2 activities because with assumption of two I go for first selecting MIN and last selecting MAX which is not the same as MIN nothing in between will be available in this type of query and if you think that you have cases where you have more then 2 customers stick to your original query otherwise it will need serious programming like looping through the data and pivoting it.

[PHP]

SELECT name, new_modelno, new_serialno, new_type, new_make, new_mast, new_capacity,
(select partyidname from FilteredActivityParty where activityid = Activity1 AND activitypartycustomer.participationtypemask = 11) partyidname1,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity1) scheduledstart1,
(select scheduledend from FilteredServiceAppointment where activityid = Activity1) scheduledend1,

(select partyidname from FilteredActivityParty where activityid = Activity2 AND Activity2 <> Activity1 AND activitypartycustomer.participationtypemask = 11) partyidname2,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledstart2,
(select scheduledend from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledend2,
FROM (
SELECT equipment.name name ,
equipment.new_modelno new_modelno,
equipment.new_serialno new_serialno,
equipment.new_type new_type,
equipment.new_make new_make,
equipment.new_mast new_mast,
equipment.new_capacity new_capacity,
min(serviceappointment.activityid) Activity1,
max(serviceappointment.activityid) Activity2
FROM FilteredEquipment AS equipment
INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid
INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid
WHERE (serviceappointment.statecode = 0)
group by equipment.name ,
equipment.new_modelno,
equipment.new_serialno ,
equipment.new_type ,
equipment.new_make,
equipment.new_mast,
equipment.new_capacity) a

ORDER BY equipment.name [/PHP]

Good Luck.
Hi

Thanks so much for your help. As you can probably tell this type of query is what we consider to be quite complex and is way behind our scope. So we really appreciate your assistance.

There may be situations where we will have more than one service activity however there should never be more than two so this is fine. We will definitely have more than two customers.

I tested your Query in a virtual image and we received the following error message. Incorrect Syntax near the keyword 'FROM'
Incorrect Syntax near 'a'
Statement(s) could not be prepared.

I removed the 'a' from the end of the query as I thought this may have been inserted incorrrectly and we received the following error: Incorrect Syntax near the keyword 'FROM'.

If you have any ideas, please let us know.

Thanks again
Oct 9 '07 #6
iburyak
1,017 Recognized Expert Top Contributor
Try this:


Expand|Select|Wrap|Line Numbers
  1. SELECT name, new_modelno, new_serialno, new_type, new_make, new_mast, new_capacity,
  2. (select partyidname from FilteredActivityParty where activityid = Activity1 AND activitypartycustomer.participationtypemask = 11) partyidname1,
  3. (select scheduledstart from FilteredServiceAppointment where activityid = Activity1) scheduledstart1,
  4. (select scheduledend from FilteredServiceAppointment where activityid = Activity1) scheduledend1,
  5.  
  6. (select partyidname from FilteredActivityParty where activityid = Activity2 AND Activity2 <> Activity1 AND activitypartycustomer.participationtypemask = 11) partyidname2,
  7. (select scheduledstart from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledstart2,
  8. (select scheduledend from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledend2
  9. FROM (
  10.     SELECT equipment.name name , 
  11.     equipment.new_modelno new_modelno, 
  12.     equipment.new_serialno new_serialno, 
  13.     equipment.new_type new_type, 
  14.     equipment.new_make new_make, 
  15.     equipment.new_mast new_mast, 
  16.     equipment.new_capacity new_capacity, 
  17.     min(serviceappointment.activityid) Activity1,
  18.     max(serviceappointment.activityid) Activity2
  19.     FROM FilteredEquipment AS equipment 
  20.     INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid 
  21.     INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  22.     WHERE (serviceappointment.statecode = 0) 
  23.         group by equipment.name , 
  24.              equipment.new_modelno, 
  25.              equipment.new_serialno , 
  26.              equipment.new_type , 
  27.              equipment.new_make, 
  28.              equipment.new_mast, 
  29.              equipment.new_capacity) a
  30.  
  31. ORDER BY equipment.name
Oct 9 '07 #7
Mark Braithwaite
22 New Member
Hi

I now receive the following error message,

The column prefix 'activitypartycustomer' does not match with a table name or alias name used in the query.
The column prefix 'equipment' does not match with a table name or alias name used in the query.
Statements could not be prepared.

I tested the query by using the query analyzer in SQL and I received an invalid object name message.

Really appreciate your help.

Thanks
Oct 9 '07 #8
iburyak
1,017 Recognized Expert Top Contributor
Try this:


SELECT name, new_modelno, new_serialno, new_type, new_make, new_mast, new_capacity,
(select partyidname from FilteredActivityParty where activityid = Activity1 AND participationtypemask = 11) partyidname1,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity1) scheduledstart1,
(select scheduledend from FilteredServiceAppointment where activityid = Activity1) scheduledend1,

(select partyidname from FilteredActivityParty where activityid = Activity2 AND Activity2 <> Activity1 AND participationtypemask = 11) partyidname2,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledstart2,
(select scheduledend from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledend2
FROM (
SELECT equipment.name name ,
equipment.new_modelno new_modelno,
equipment.new_serialno new_serialno,
equipment.new_type new_type,
equipment.new_make new_make,
equipment.new_mast new_mast,
equipment.new_capacity new_capacity,
min(serviceappointment.activityid) Activity1,
max(serviceappointment.activityid) Activity2
FROM FilteredEquipment AS equipment
INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid
INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid
WHERE (serviceappointment.statecode = 0)
group by equipment.name ,
equipment.new_modelno,
equipment.new_serialno ,
equipment.new_type ,
equipment.new_make,
equipment.new_mast,
equipment.new_capacity) a

ORDER BY name
Oct 9 '07 #9
Mark Braithwaite
22 New Member
Hi

I now get the following error message:

The minimum aggregate operation cannot take a unique identifier data type as an argument.
The maximum aggregate operation cannot take a unique identifier data type as an argument.

Any ideas? Thanks for all your help. Really appreciate it.

Thanks again
Oct 9 '07 #10
iburyak
1,017 Recognized Expert Top Contributor
It is a data-type of a column FilteredActivityParty.activityid I guess. It is when you put some universal alphanumeric value which is hard to read or query.
I am not sure how to overcome this.
Let me think during the day on what to do with this problem.
People with little knowledge or just no intention of querying data put such fancy things in a database but then it makes it extremely hard to work with.

In a meanwhile try this:

SELECT name, new_modelno, new_serialno, new_type, new_make, new_mast, new_capacity,
(select partyidname from FilteredActivityParty where activityid = Activity1 AND participationtypemask = 11) partyidname1,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity1) scheduledstart1,
(select scheduledend from FilteredServiceAppointment where activityid = Activity1) scheduledend1,

(select partyidname from FilteredActivityParty where activityid = Activity2 AND Activity2 <> Activity1 AND participationtypemask = 11) partyidname2,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledstart2,
(select scheduledend from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledend2
FROM (
SELECT equipment.name name ,
equipment.new_modelno new_modelno,
equipment.new_serialno new_serialno,
equipment.new_type new_type,
equipment.new_make new_make,
equipment.new_mast new_mast,
equipment.new_capacity new_capacity,
min(convert(varchar(255), serviceappointment.activityid)) Activity1,
max(convert(varchar(255), serviceappointment.activityid)) Activity2
FROM FilteredEquipment AS equipment
INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid
INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid
WHERE (serviceappointment.statecode = 0)
group by equipment.name ,
equipment.new_modelno,
equipment.new_serialno ,
equipment.new_type ,
equipment.new_make,
equipment.new_mast,
equipment.new_capacity) a

ORDER BY name
Oct 9 '07 #11
Mark Braithwaite
22 New Member
It is a data-type of a column FilteredActivityParty.activityid I guess. It is when you put some universal alphanumeric value which is hard to read or query.
I am not sure how to overcome this.
Let me think during the day on what to do with this problem.
People with little knowledge or just no intention of querying data put such fancy things in a database but then it makes it extremely hard to work with.

In a meanwhile try this:

SELECT name, new_modelno, new_serialno, new_type, new_make, new_mast, new_capacity,
(select partyidname from FilteredActivityParty where activityid = Activity1 AND participationtypemask = 11) partyidname1,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity1) scheduledstart1,
(select scheduledend from FilteredServiceAppointment where activityid = Activity1) scheduledend1,

(select partyidname from FilteredActivityParty where activityid = Activity2 AND Activity2 <> Activity1 AND participationtypemask = 11) partyidname2,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledstart2,
(select scheduledend from FilteredServiceAppointment where activityid = Activity2 AND Activity2 <> Activity1) scheduledend2
FROM (
SELECT equipment.name name ,
equipment.new_modelno new_modelno,
equipment.new_serialno new_serialno,
equipment.new_type new_type,
equipment.new_make new_make,
equipment.new_mast new_mast,
equipment.new_capacity new_capacity,
min(convert(varchar(255), serviceappointment.activityid)) Activity1,
max(convert(varchar(255), serviceappointment.activityid)) Activity2
FROM FilteredEquipment AS equipment
INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid
INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid
WHERE (serviceappointment.statecode = 0)
group by equipment.name ,
equipment.new_modelno,
equipment.new_serialno ,
equipment.new_type ,
equipment.new_make,
equipment.new_mast,
equipment.new_capacity) a

ORDER BY name
Hi

This worked perfectly! I would like to just clarify a few things with you before I test this in a live environment.

The report worked first time however there was no data in the report. I removed the WHERE statement and everything seemed to work.

Just want confirm with you. This report will only display Equipment that have been scheduled. Right? What problems or what may occur if the equipment has been scheduled for a third time ie. A third service activity has been created.

Is there way to display only the service activities / service appointments that have a status of 'Open'. I assume this will create a WHERE statement(serviceappointment.statecode = 1).

I will test this. Thanks so much for all your help. If there any limitations, please let me know. Thanks alot.
Oct 9 '07 #12
iburyak
1,017 Recognized Expert Top Contributor
Unfortunately I have no knowledge of your business and values in columns.
I just used whatever it was in original query so I wouldn't break the logic.

You should test carefully and compare with your original report to see if you get results you desire.

Sorry, no help from me here.

Irina.
Oct 9 '07 #13
Mark Braithwaite
22 New Member
Unfortunately I have no knowledge of your business and values in columns.
I just used whatever it was in original query so I wouldn't break the logic.

You should test carefully and compare with your original report to see if you get results you desire.

Sorry, no help from me here.

Irina.
Hi

No problem, Thanks anyways for all your help

Thanks again
Oct 10 '07 #14
Mark Braithwaite
22 New Member
Hi

No problem, Thanks anyways for all your help

Thanks again
Hi

I just have one more question which I am sure you can assist me with. The report works perfectly however we would like to sort by date.

The last service activity should be appear in the first column and the most recent service activity should appear in the second column.

Is there a condition we can add to the WHERE Statement? I am sure this should be quite easy to achieve.

Thanks again for your help. Really appreciate your assistance.

Thanks
Mark
Oct 15 '07 #15
Mark Braithwaite
22 New Member
Hi

I just have one more question which I am sure you can assist me with. The report works perfectly however we would like to sort by date.

The last service activity should be appear in the first column and the most recent service activity should appear in the second column.

Is there a condition we can add to the WHERE Statement? I am sure this should be quite easy to achieve.

Thanks again for your help. Really appreciate your assistance.

Thanks
Mark
Hi

We have since found that the activities appear in the order that they were created. We have attempted to edit the query where scheduledstart1 is greater then scheduledstart2 however this did not seem to work.

I suppose this is because it still appears in the order that it was created. I guess we need to add some sort of a condition. Would a CASE statement be the correct solution?

We need to reference the scheduled date that would appear in the spreadsheet.

Really appreciate anyone's assistance.

Many Thanks
Mark
Oct 16 '07 #16
iburyak
1,017 Recognized Expert Top Contributor
Try this:

Expand|Select|Wrap|Line Numbers
  1. SELECT name, new_modelno, new_serialno, new_type, new_make, new_mast, new_capacity,
  2. (select partyidname from FilteredActivityParty where activityid = Activity2 AND participationtypemask = 11) partyidname1,
  3. (select scheduledstart from FilteredServiceAppointment where activityid = Activity2) scheduledstart1,
  4. (select scheduledend from FilteredServiceAppointment where activityid = Activity2) scheduledend1,
  5.  
  6. (select partyidname from FilteredActivityParty where activityid = Activity1 AND Activity2 <> Activity1 AND participationtypemask = 11) partyidname2,
  7. (select scheduledstart from FilteredServiceAppointment where activityid = Activity1 AND Activity2 <> Activity1) scheduledstart2,
  8. (select scheduledend from FilteredServiceAppointment where activityid = Activity1 AND Activity2 <> Activity1) scheduledend2
  9. FROM (
  10. SELECT equipment.name name , 
  11. equipment.new_modelno new_modelno, 
  12. equipment.new_serialno new_serialno, 
  13. equipment.new_type new_type, 
  14. equipment.new_make new_make, 
  15. equipment.new_mast new_mast, 
  16. equipment.new_capacity new_capacity, 
  17. min(serviceappointment.activityid) Activity1,
  18. max(serviceappointment.activityid) Activity2
  19. FROM FilteredEquipment AS equipment 
  20. INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid 
  21. INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  22. WHERE (serviceappointment.statecode = 0) 
  23. group by equipment.name , 
  24. equipment.new_modelno, 
  25. equipment.new_serialno , 
  26. equipment.new_type , 
  27. equipment.new_make, 
  28. equipment.new_mast, 
  29. equipment.new_capacity) a
  30.  
  31. ORDER BY name
Good Luck.
Oct 16 '07 #17
Mark Braithwaite
22 New Member
Try this:

Expand|Select|Wrap|Line Numbers
  1. SELECT name, new_modelno, new_serialno, new_type, new_make, new_mast, new_capacity,
  2. (select partyidname from FilteredActivityParty where activityid = Activity2 AND participationtypemask = 11) partyidname1,
  3. (select scheduledstart from FilteredServiceAppointment where activityid = Activity2) scheduledstart1,
  4. (select scheduledend from FilteredServiceAppointment where activityid = Activity2) scheduledend1,
  5.  
  6. (select partyidname from FilteredActivityParty where activityid = Activity1 AND Activity2 <> Activity1 AND participationtypemask = 11) partyidname2,
  7. (select scheduledstart from FilteredServiceAppointment where activityid = Activity1 AND Activity2 <> Activity1) scheduledstart2,
  8. (select scheduledend from FilteredServiceAppointment where activityid = Activity1 AND Activity2 <> Activity1) scheduledend2
  9. FROM (
  10. SELECT equipment.name name , 
  11. equipment.new_modelno new_modelno, 
  12. equipment.new_serialno new_serialno, 
  13. equipment.new_type new_type, 
  14. equipment.new_make new_make, 
  15. equipment.new_mast new_mast, 
  16. equipment.new_capacity new_capacity, 
  17. min(serviceappointment.activityid) Activity1,
  18. max(serviceappointment.activityid) Activity2
  19. FROM FilteredEquipment AS equipment 
  20. INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid 
  21. INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  22. WHERE (serviceappointment.statecode = 0) 
  23. group by equipment.name , 
  24. equipment.new_modelno, 
  25. equipment.new_serialno , 
  26. equipment.new_type , 
  27. equipment.new_make, 
  28. equipment.new_mast, 
  29. equipment.new_capacity) a
  30.  
  31. ORDER BY name
Good Luck.
Hi

I adjusted your query to include convert varchar(255). The script did not seem to work 100%. At first all the future activities appeared in the second colum however I created a few additional activities in the system and refreshed the data. It appears that only a few of the past activities are appearing in the second column.

I am not sure why this is happening and I will test this again.

Thanks
Oct 18 '07 #18
iburyak
1,017 Recognized Expert Top Contributor
I am not sure what did you do with varchar(255)
To get over this problem you should give me sample of your data in both tables and desired result.

I will be away starting next week so you have 2 days to finish this.
Give me as much data as possible and as many different cases as possible and results you want to get in each case. It is a complicated query and without testing in on life data I don't think I can help you further.
If you want, you can export everything into Excel or Access file and attach to your Message.

Thank you.
Oct 18 '07 #19
Mark Braithwaite
22 New Member
Hi

Thanks alot for your assistance. Please find herewith a sample of the revised query that I have drafted from the information you sent me.

SELECT name, new_modelno, new_serialno, new_type, new_make, new_mast, new_capacity,
(select partyidname from FilteredActivityParty where activityid = Activity2 AND participationtypemask = 11) partyidname1,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity2) scheduledstart1,
(select scheduledend from FilteredServiceAppointment where activityid = Activity2) scheduledend1,
(select partyidname from FilteredActivityParty where activityid = Activity1 AND Activity2 <> Activity1 AND participationtypemask = 11) partyidname2,
(select scheduledstart from FilteredServiceAppointment where activityid = Activity1 AND Activity2 <> Activity1) scheduledstart2,
(select scheduledend from FilteredServiceAppointment where activityid = Activity1 AND Activity2 <> Activity1) scheduledend2
FROM (
SELECT equipment.name name ,
equipment.new_modelno new_modelno,
equipment.new_serialno new_serialno,
equipment.new_type new_type,
equipment.new_make new_make,
equipment.new_mast new_mast,
equipment.new_capacity new_capacity,
min(convert(varchar255))serviceappointment.activit yid) Activity1,
max(convert(varchar255))serviceappointment.activit yid) Activity2
FROM FilteredEquipment AS equipment
INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid
INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid
WHERE (serviceappointment.statecode = 3)
group by equipment.name ,
equipment.new_modelno,
equipment.new_serialno ,
equipment.new_type ,
equipment.new_make,
equipment.new_mast,
equipment.new_capacity) a

ORDER BY name

I have added the convert(varchar(255)) to avoid the minimum / maximum error aggregate error message which appears if this is not added.

Please find herewith a sample of the data that we receive after inserting the query.

Customer 1 sch start1 sch end1 Customer 2 sch start2 sch end2
ABC 09/10/2009 09/10/2011 Integrated 04/05/2007 18/10/2008
Walkers 06/05/2005 09/04/2006 Pack 15/04/2006 11/05/2007
Smith 11/12/2005 15/03/2006 Brown 11/12/2006 08/09/2007
James 05/06/2006 08/04/2007 Marine 04/06/2007 05/05/2008
RC 10/10/2006 08/06/2007 Wright 07/08/2007 07/06/2008
Associate17/07/2008 18/09/200 ABC 04/11/2005 06/07/2006

The incorrect fields relate to the customer ABC on the first and last line. As you can see the columns Scheduled Start 1 and Scheduled Start 2 need to be sorted correctly.

The Scheduled Start 1 column should include all the activities which were scheduled in the past and Scheduled Start 2 should include all the activities that have been scheduled for the future.

To be more correct, Customer 1, Scheduled Start 1, Scheduled End 1 should all include the past activities and Customer 2, Scheduled Start 2, Scheduled End 2 should include the future activities.

At the moment everything is displayed randomly with the correct information though. It seems like that if a future activity is created before the activity which occurred in the past then this activity will be displayed first.

Thanks so much for all your help
Oct 18 '07 #20
iburyak
1,017 Recognized Expert Top Contributor
I need not a result but the data that you have in tables and column definitions (means datatypes) for following tables:

FilteredEquipment
FilteredActivityParty


Result could be incorrect for example if you have 90 and 10000 in numeric column then 1000 is grater then 90 but if the same values are in character columns then 90 grater then 10000 because character '9' is grater then character '1'.

Thank you.
Oct 19 '07 #21
Mark Braithwaite
22 New Member
I need not a result but the data that you have in tables and column definitions (means datatypes) for following tables:

FilteredEquipment
FilteredActivityParty


Result could be incorrect for example if you have 90 and 10000 in numeric column then 1000 is grater then 90 but if the same values are in character columns then 90 grater then 10000 because character '9' is grater then character '1'.

Thank you.
Hi

I am not 100% certain what you are asking for but the datatypes for FilteredEquipment are nvarchar fields. The FilteredActivityParty which is the customers name is a uniqueidentifier and FilteredServiceAppointment, the scheduled date fields are datetime types.

Do you need samples from SQL or samples of the Excel spreadsheets? Please let me know if there is anything else you need.

Thanks so much
Oct 19 '07 #22
iburyak
1,017 Recognized Expert Top Contributor
In your query you join 3 tables from database.


Expand|Select|Wrap|Line Numbers
  1. FROM FilteredEquipment AS equipment 
  2. INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid 
  3. INNER JOIN FilteredServiceAppointment  AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
I thought to recriate the same tables with data in them on my server and try correcting SQL statment with your data. Unfortunately i don't see how i can help you any further without seeing data itself and having the same environment that you do.


This statement is totally incorrect. Don't you get an error message when you execute query with it? I am not sure what you were trying to do here.

min(convert(varchar255))serviceappointment.activit yid) Activity1,
max(convert(varchar255))serviceappointment.activit yid) Activity2
Oct 19 '07 #23
Mark Braithwaite
22 New Member
In your query you join 3 tables from database.


Expand|Select|Wrap|Line Numbers
  1. FROM FilteredEquipment AS equipment 
  2. INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid 
  3. INNER JOIN FilteredServiceAppointment  AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
I thought to recriate the same tables with data in them on my server and try correcting SQL statment with your data. Unfortunately i don't see how i can help you any further without seeing data itself and having the same environment that you do.


This statement is totally incorrect. Don't you get an error message when you execute query with it? I am not sure what you were trying to do here.

min(convert(varchar255))serviceappointment.activit yid) Activity1,
max(convert(varchar255))serviceappointment.activit yid) Activity2
Hi

Thanks for all your help. You must be quite frustrated. Thanks. I inserted the above statement after I received an error message stating that the minimum aggregate operation cannot take a unique indentifier data type as an argument.

This statement was your suggestion after I tested an earlier script that you wrote. You may find an explanation earlier in this post.

I am at a loss with this. I guess it is quite hard to achieve.

Thanks for all your help.
Mark
Oct 19 '07 #24
iburyak
1,017 Recognized Expert Top Contributor
This is why you are getting random dates because GUID is not consecutive ID it is no guaranty that latest GUID will be always grater then earliest the only guaranty you have with GUID is that it is unique and MAX and MIN here will not work.
Oct 19 '07 #25
iburyak
1,017 Recognized Expert Top Contributor
It is very hard to write query of this complexity blindfolded... :(

Try this:

Expand|Select|Wrap|Line Numbers
  1. Select a.*, 
  2. case when a.scheduledstart = b.scheduledstart then '' else b.partyidname end,
  3. case when a.scheduledstart = b.scheduledstart then '' else b.scheduledstart end,
  4. case when a.scheduledstart = b.scheduledstart then '' else b.scheduledend end
  5. FROM (
  6.     SELECT equipment.name , 
  7.     equipment.new_modelno, 
  8.     equipment.new_serialno , 
  9.     equipment.new_type , 
  10.     equipment.new_make, 
  11.     equipment.new_mast, 
  12.     equipment.new_capacity, 
  13.  
  14.     activitypartycustomer.partyidname, 
  15.     serviceappointment.scheduledstart, 
  16.     serviceappointment.scheduledend 
  17.  
  18.     FROM FilteredEquipment AS equipment 
  19.     INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid 
  20.     INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  21.     INNER JOIN FilteredActivityParty AS activitypartycustomer ON serviceappointment.activityid = activitypartycustomer.activityid AND 
  22.                                                                  activitypartycustomer.participationtypemask = 11 
  23.     WHERE (serviceappointment.statecode = 0) 
  24.     and serviceappointment.scheduledstart = (select max(serviceappointment.scheduledstart)
  25.                          FROM FilteredEquipment AS e 
  26.                          INNER JOIN FilteredActivityParty AS activityparty ON e.equipmentid = partyid 
  27.                          INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  28.                          INNER JOIN FilteredActivityParty AS activitypartycustomer ON serviceappointment.activityid = activitypartycustomer.activityid AND 
  29.                                                                                      activitypartycustomer.participationtypemask = 11
  30.                                                  where e.name = equipment.name 
  31.                                              and e.new_modelno = equipment.new_modelno 
  32.                                              and e.new_serialno = equipment.new_serialno  
  33.                                              and e.new_type = equipment.new_type  
  34.                                              and e.new_make = equipment.new_make
  35.                                              and e.new_mast = equipment.new_mast 
  36.                                              and e.new_capacity = equipment.new_capacity
  37.                                              )
  38.       ) a
  39. JOIN (
  40.  
  41.     SELECT equipment.name , 
  42.     equipment.new_modelno, 
  43.     equipment.new_serialno , 
  44.     equipment.new_type , 
  45.     equipment.new_make, 
  46.     equipment.new_mast, 
  47.     equipment.new_capacity, 
  48.  
  49.     activitypartycustomer.partyidname, 
  50.     serviceappointment.scheduledstart, 
  51.     serviceappointment.scheduledend 
  52.  
  53.     FROM FilteredEquipment AS equipment 
  54.     INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid 
  55.     INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  56.     INNER JOIN FilteredActivityParty AS activitypartycustomer ON serviceappointment.activityid = activitypartycustomer.activityid AND 
  57.                                                                  activitypartycustomer.participationtypemask = 11 
  58.     WHERE (serviceappointment.statecode = 0) 
  59.     and serviceappointment.scheduledstart = (select min(serviceappointment.scheduledstart)
  60.                          FROM FilteredEquipment AS e 
  61.                          INNER JOIN FilteredActivityParty AS activityparty ON e.equipmentid = partyid 
  62.                          INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  63.                          INNER JOIN FilteredActivityParty AS activitypartycustomer ON serviceappointment.activityid = activitypartycustomer.activityid AND 
  64.                                                                                      activitypartycustomer.participationtypemask = 11
  65.                                                  where e.name = equipment.name 
  66.                                              and e.new_modelno = equipment.new_modelno 
  67.                                              and e.new_serialno = equipment.new_serialno  
  68.                                              and e.new_type = equipment.new_type  
  69.                                              and e.new_make = equipment.new_make
  70.                                              and e.new_mast = equipment.new_mast 
  71.                                              and e.new_capacity = equipment.new_capacity
  72.                                              )
  73.      ) b on a.name = b.name and a.new_modelno = b.new_modelno and a.new_serialno = b.new_serialno and a.new_type = b.new_type and
  74.             a.new_make = b.new_make and a.new_mast = b.new_mast and a.new_capacity = b.new_capacity
  75. ORDER BY equipment.name 
Oct 19 '07 #26
Mark Braithwaite
22 New Member
It is very hard to write query of this complexity blindfolded... :(

Try this:

Expand|Select|Wrap|Line Numbers
  1. Select a.*, 
  2. case when a.scheduledstart = b.scheduledstart then '' else b.partyidname end,
  3. case when a.scheduledstart = b.scheduledstart then '' else b.scheduledstart end,
  4. case when a.scheduledstart = b.scheduledstart then '' else b.scheduledend end
  5. FROM (
  6.     SELECT equipment.name , 
  7.     equipment.new_modelno, 
  8.     equipment.new_serialno , 
  9.     equipment.new_type , 
  10.     equipment.new_make, 
  11.     equipment.new_mast, 
  12.     equipment.new_capacity, 
  13.  
  14.     activitypartycustomer.partyidname, 
  15.     serviceappointment.scheduledstart, 
  16.     serviceappointment.scheduledend 
  17.  
  18.     FROM FilteredEquipment AS equipment 
  19.     INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid 
  20.     INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  21.     INNER JOIN FilteredActivityParty AS activitypartycustomer ON serviceappointment.activityid = activitypartycustomer.activityid AND 
  22.                                                                  activitypartycustomer.participationtypemask = 11 
  23.     WHERE (serviceappointment.statecode = 0) 
  24.     and serviceappointment.scheduledstart = (select max(serviceappointment.scheduledstart)
  25.                          FROM FilteredEquipment AS e 
  26.                          INNER JOIN FilteredActivityParty AS activityparty ON e.equipmentid = partyid 
  27.                          INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  28.                          INNER JOIN FilteredActivityParty AS activitypartycustomer ON serviceappointment.activityid = activitypartycustomer.activityid AND 
  29.                                                                                      activitypartycustomer.participationtypemask = 11
  30.                                                  where e.name = equipment.name 
  31.                                              and e.new_modelno = equipment.new_modelno 
  32.                                              and e.new_serialno = equipment.new_serialno  
  33.                                              and e.new_type = equipment.new_type  
  34.                                              and e.new_make = equipment.new_make
  35.                                              and e.new_mast = equipment.new_mast 
  36.                                              and e.new_capacity = equipment.new_capacity
  37.                                              )
  38.       ) a
  39. JOIN (
  40.  
  41.     SELECT equipment.name , 
  42.     equipment.new_modelno, 
  43.     equipment.new_serialno , 
  44.     equipment.new_type , 
  45.     equipment.new_make, 
  46.     equipment.new_mast, 
  47.     equipment.new_capacity, 
  48.  
  49.     activitypartycustomer.partyidname, 
  50.     serviceappointment.scheduledstart, 
  51.     serviceappointment.scheduledend 
  52.  
  53.     FROM FilteredEquipment AS equipment 
  54.     INNER JOIN FilteredActivityParty AS activityparty ON equipment.equipmentid = partyid 
  55.     INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  56.     INNER JOIN FilteredActivityParty AS activitypartycustomer ON serviceappointment.activityid = activitypartycustomer.activityid AND 
  57.                                                                  activitypartycustomer.participationtypemask = 11 
  58.     WHERE (serviceappointment.statecode = 0) 
  59.     and serviceappointment.scheduledstart = (select min(serviceappointment.scheduledstart)
  60.                          FROM FilteredEquipment AS e 
  61.                          INNER JOIN FilteredActivityParty AS activityparty ON e.equipmentid = partyid 
  62.                          INNER JOIN FilteredServiceAppointment AS serviceappointment ON serviceappointment.activityid = activityparty.activityid 
  63.                          INNER JOIN FilteredActivityParty AS activitypartycustomer ON serviceappointment.activityid = activitypartycustomer.activityid AND 
  64.                                                                                      activitypartycustomer.participationtypemask = 11
  65.                                                  where e.name = equipment.name 
  66.                                              and e.new_modelno = equipment.new_modelno 
  67.                                              and e.new_serialno = equipment.new_serialno  
  68.                                              and e.new_type = equipment.new_type  
  69.                                              and e.new_make = equipment.new_make
  70.                                              and e.new_mast = equipment.new_mast 
  71.                                              and e.new_capacity = equipment.new_capacity
  72.                                              )
  73.      ) b on a.name = b.name and a.new_modelno = b.new_modelno and a.new_serialno = b.new_serialno and a.new_type = b.new_type and
  74.             a.new_make = b.new_make and a.new_mast = b.new_mast and a.new_capacity = b.new_capacity
  75. ORDER BY equipment.name 
Hi

I did not realize that this would require a query which is so complex. We attempted to use your query but we received an error stating, Could not add the table '('. We are unsure where an additional close or open bracket option is required.

I am sure this requires a simple solution.

Thanks for all you help.
Mark
Oct 22 '07 #27
Mark Braithwaite
22 New Member
Hi

We attempted to use the query you suggested and we received the following error message. Could not add the table '('

I did not realize that such a complex query would be required and I am unsure where to make the adjustment.

Thanks for all your help.
Mark
Oct 22 '07 #28
Mark Braithwaite
22 New Member
Hi

We attempted to use the query you suggested and we received the following error message. Could not add the table '('

I did not realize that such a complex query would be required and I am unsure where to make the adjustment.

Thanks for all your help.
Mark
Hi

Is anyone able to assit with this? We desperate for a solution. Seems like we are almost there.

We will really appreciate any assistance that anyone is able to offer.

Thanks
Oct 29 '07 #29

Sign in to post your reply or Sign up for a free account.

Similar topics

9
2749
by: Ed_No_Spam_Please_Weber | last post by:
Hello All & Thanks in advance for your help! Background: 1) tblT_Documents is the primary parent transaction table that has 10 fields and about 250,000 rows 2) There are 9 child tables with...
4
2643
by: Orion | last post by:
Hi, This is kind of last minute, I have a day and a half left to figure this out. I'm working on a project using ms-sqlserver. We are creating a ticket sales system, as part of the system, I...
2
1438
by: tdmailbox | last post by:
I have a database with three tables tbl_listings - listings of houses on for sale tbl_intersted - table which tracks if a user is interested in the listing, it has two columns mls(the key for...
5
2655
by: Daniel Tan | last post by:
Are there anyway to copy rows of records from one query to another query and then hide the records in source query ? Pls advise. Thanks. Regards, Daniel
2
3141
by: Simon Pleasants | last post by:
Am something of a newbie at this, so please bear with any stupid questions. I have created a database to track shipments that we import. The information is stored in a table and I have created...
3
1863
by: John Baker | last post by:
Hi: At the outset let me admit that I screwed up! I have built a rather elaborate set of forms and sub forms starting with a client table, and going down to PO and Line item. This works very...
5
1659
by: social_engin33r | last post by:
Hello, I've been asked to help someone set up a database. One of the fields in the database is a text field that holds data imported in this format: 11-A-11-11 The users prefer to see the...
3
3274
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when...
2
9568
by: mary mathews | last post by:
is there any way to change the position of a column in a table by writing sql query? for eg; Table 'demo' contains 3 fields: companyName EmpName id I need to move the 'id' from last...
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
406
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.