SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Msg 4104
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

MichaelJSQL
Posting Yak Master

172 Posts

Posted - 07/30/2014 :  08:26:52  Show Profile  Reply with Quote
Let's get you unconfused. Let's start with what you are trying to do.

Your code issues have been solved and now you want to get your data into the appropriate database.

Is this statement correct:
You are updating your data in SQL SERVER and want it to automatically be pushed to MS Access?

If not: write what you are trying to do and I can walk you through via steps.
Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 07/30/2014 :  10:16:17  Show Profile  Reply with Quote

yes you are right, i update data in MSSQL and then i want to push them to MS access.
Did you see this code ?Can you take a look at it please?

Hello,

I have the following code that i asked before about it. it calculates the sum for all of the bereich but not for bereich=null but i want that it calculates it as well because in my final result i need it.

UPDATE AMPPU_Alle_Fehlteile SET
summe_Reparaturzeit_B_Daily = B.SUpdateColSource1
FROM AMPPU_Alle_Fehlteile A
INNER JOIN (select Offline_date,bereich,SUM(Reparatur_hr)*60 SUpdateColSource1 FROM
AMPPU_Alle_Fehlteile group by Offline_date,Bereich) B
ON A.Offline_date = B.Offline_date and
A.Bereich = B.Bereich
ISNULL(A.Bereich,'Null') = ISNULL(B.bereich,'Null');
i added the red line but it has error. Can you help me please?
thank you for your help

quote:
Originally posted by MichaelJSQL

Let's get you unconfused. Let's start with what you are trying to do.

Your code issues have been solved and now you want to get your data into the appropriate database.

Is this statement correct:
You are updating your data in SQL SERVER and want it to automatically be pushed to MS Access?

If not: write what you are trying to do and I can walk you through via steps.


Go to Top of Page

MichaelJSQL
Posting Yak Master

172 Posts

Posted - 07/30/2014 :  18:37:16  Show Profile  Reply with Quote
OK - So your code is working and you were going to run it periodically by using a SQL agent job. Let me know if you need help with that.

Before you export data - have you considered using a linked table to the SQL Server. If you link to AMPPU_Alle_Fehlteile from Access , there would be no reason to push data as the table is always looking at the SQL Server table. Is that an option?
Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 07/31/2014 :  02:49:45  Show Profile  Reply with Quote
hello
thank you very much for your help
it works now
do you know how i cna get just the date part of a date time field in sql server or access?
my column is like this :
2012-08-20 08:02:54.000
but i just need the 2012-08-20
can you help me please?





quote:
Originally posted by MichaelJSQL

OK - So your code is working and you were going to run it periodically by using a SQL agent job. Let me know if you need help with that.

Before you export data - have you considered using a linked table to the SQL Server. If you link to AMPPU_Alle_Fehlteile from Access , there would be no reason to push data as the table is always looking at the SQL Server table. Is that an option?

Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 07/31/2014 :  03:22:02  Show Profile  Reply with Quote

hello,
i have the following code but it has error
insert into AMPPU_Alle_Fehlteile([Zeit Fehler Ein])
select Convert(varchar(4),DATEPART(year, Zeit_Fehler_EIN)) +
'/'+ Convert(varchar(2),DATEPART(MONTH, Zeit_Fehler_EIN)) + '/' +
Convert(varchar(2),DATEPART(DAY, Zeit_Fehler_EIN)) from AMPPU_Alle_Fehlteile;

it has this errror
Msg 515, Level 16, State 2, Line 1
The value NULL can not be inserted in the order column, Reporting.dbo.AMPPU_Alle_Fehlteile table. The column does not allow NULL values. Error in INSERT.
The statement has been terminated.


can you guide me please?







quote:
Originally posted by mana

hello
thank you very much for your help
it works now
do you know how i cna get just the date part of a date time field in sql server or access?
my column is like this :
2012-08-20 08:02:54.000
but i just need the 2012-08-20
can you help me please?





quote:
Originally posted by MichaelJSQL

OK - So your code is working and you were going to run it periodically by using a SQL agent job. Let me know if you need help with that.

Before you export data - have you considered using a linked table to the SQL Server. If you link to AMPPU_Alle_Fehlteile from Access , there would be no reason to push data as the table is always looking at the SQL Server table. Is that an option?



Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 07/31/2014 :  03:27:06  Show Profile  Reply with Quote



hello
i changed the code
update AMPPU_Alle_Fehlteile
set [Zeit Fehler Ein] =
(select Convert(varchar(4),DATEPART(year, Zeit_Fehler_EIN)) +
'/'+ Convert(varchar(2),DATEPART(MONTH, Zeit_Fehler_EIN)) + '/' +
Convert(varchar(2),DATEPART(DAY, Zeit_Fehler_EIN)) from AMPPU_Alle_Fehlteile);

but it has still the problem:
Msg 512, Level 16, State 1, Line 1
The subquery returned more than one value. This is not permitted when the subquery follows =,! =, <, <=,> Or> = follows or is used as an expression.
The statement has been terminated.


can you guide me please?






quote:
Originally posted by mana


hello,
i have the following code but it has error
insert into AMPPU_Alle_Fehlteile([Zeit Fehler Ein])
select Convert(varchar(4),DATEPART(year, Zeit_Fehler_EIN)) +
'/'+ Convert(varchar(2),DATEPART(MONTH, Zeit_Fehler_EIN)) + '/' +
Convert(varchar(2),DATEPART(DAY, Zeit_Fehler_EIN)) from AMPPU_Alle_Fehlteile;

it has this errror
Msg 515, Level 16, State 2, Line 1
The value NULL can not be inserted in the order column, Reporting.dbo.AMPPU_Alle_Fehlteile table. The column does not allow NULL values. Error in INSERT.
The statement has been terminated.


can you guide me please?







quote:
Originally posted by mana

hello
thank you very much for your help
it works now
do you know how i cna get just the date part of a date time field in sql server or access?
my column is like this :
2012-08-20 08:02:54.000
but i just need the 2012-08-20
can you help me please?





quote:
Originally posted by MichaelJSQL

OK - So your code is working and you were going to run it periodically by using a SQL agent job. Let me know if you need help with that.

Before you export data - have you considered using a linked table to the SQL Server. If you link to AMPPU_Alle_Fehlteile from Access , there would be no reason to push data as the table is always looking at the SQL Server table. Is that an option?





Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 07/31/2014 :  07:57:03  Show Profile  Reply with Quote
i nedd just the date part of the column datetime field. but i don't know exactly what to do. I have the column zeit fehler ein like this:
2012-08-29 10:33:59.000
2012-08-29 06:41:50.000
2012-09-13 09:01:17.000
2012-09-27 14:44:12.000
2012-09-24 08:07:03.000
2012-09-28 10:04:53.000
2012-10-01 06:55:47.000
2012-10-11 06:56:02.000
2012-10-11 12:56:11.000
2012-10-11 10:23:27.000
2012-10-05 06:51:08.000
2012-10-05 08:56:29.000
2012-10-05 07:49:52.000
2012-10-05 09:26:31.000
2012-10-08 07:21:53.000
2012-10-08 06:17:49.000
2012-10-08 06:18:30.000
2012-10-04 06:51:30.000
2012-10-03 13:49:49.000
2012-10-04 07:05:12.000
2012-10-08 11:36:49.000
2012-10-08 08:16:26.000
2012-10-05 06:16:39.000
2012-09-19 06:54:08.000
2012-08-22 09:36:23.000
2012-08-22 10:49:04.000
2012-08-23 07:01:27.000
2012-08-23 06:04:09.000
2012-08-22 10:17:06.000
2012-08-22 10:33:27.000
2012-08-22 10:24:22.000
2012-08-23 09:52:51.000
2012-08-23 14:13:29.000
2012-08-24 13:47:39.000
2012-08-24 10:26:23.000
2012-08-24 13:45:53.000
2012-08-24 13:46:16.000
2012-08-28 12:42:00.000
2012-08-28 08:00:11.000
2012-09-26 12:59:49.000
2012-09-26 07:19:55.000
2012-09-26 10:35:42.000
2012-08-28 12:34:36.000
2012-08-28 11:02:43.000
2012-08-28 07:52:34.000
2012-08-29 07:49:50.000
2012-08-28 13:52:17.000
2012-09-05 11:49:03.000
2012-08-28 07:49:06.000
2012-08-28 09:50:53.000
2012-08-28 08:17:14.000
2012-08-29 13:01:35.000
2012-09-12 13:18:48.000
2012-09-12 10:07:07.000
2012-09-12 11:47:24.000
2012-09-19 13:39:07.000
2012-09-20 08:11:38.000
2012-10-17 07:44:52.000
2012-09-13 11:08:57.000
2012-09-13 13:36:35.000
2012-09-13 14:05:22.000
2012-09-21 06:07:01.000
2012-09-20 09:32:31.000
2012-08-20 13:56:29.000
2012-08-20 13:00:01.000
2012-08-28 11:04:57.000
2012-08-28 06:58:27.000
2012-08-28 13:15:55.000
2012-08-27 06:17:52.000
2012-09-17 07:09:46.000
2012-08-28 08:55:53.000
2012-08-28 09:48:58.000
2012-08-27 14:15:33.000
2012-08-30 13:51:06.000
2012-08-29 11:28:30.000
2012-08-29 08:44:51.000
2012-08-29 06:44:20.000
2012-08-29 07:41:28.000
2012-08-28 13:11:28.000
2012-08-28 15:07:40.000
2012-09-03 06:19:59.000
2012-08-28 14:41:09.000
2012-08-28 15:00:30.000
2012-08-27 06:05:05.000
2012-08-27 13:25:11.000
2012-09-17 10:17:15.000
2012-09-13 14:18:04.000
2012-09-11 08:19:58.000
2012-09-10 14:20:21.000
2012-08-29 11:50:13.000
2012-08-29 07:51:02.000
2012-08-29 08:24:17.000
2012-08-28 15:23:52.000
2012-08-28 11:25:15.000
2012-08-29 09:25:30.000
2012-08-28 14:52:33.000
2012-08-22 14:04:38.000
2012-09-10 07:49:15.000
2012-09-13 14:45:01.000
2012-09-07 11:23:39.000
2012-09-10 13:51:11.000
2012-09-20 06:51:53.000
2012-09-20 07:46:02.000
2012-09-20 08:58:18.000
2012-09-03 12:55:13.000
2012-09-03 12:55:36.000
2012-11-06 14:27:35.000
2012-11-06 14:25:29.000
2012-11-07 08:59:22.000
2012-08-29 08:12:37.000
2012-08-30 09:53:45.000
2012-08-24 06:43:21.000
2012-08-29 07:11:07.000
2012-08-28 13:09:35.000
2012-08-28 07:16:02.000
2012-08-28 07:34:03.000
2012-08-30 11:40:25.000
2012-08-30 14:28:47.000
2012-09-21 11:26:08.000
2012-09-24 06:20:20.000
2012-09-13 10:14:30.000
2012-09-13 05:54:16.000
2012-09-12 08:07:32.000
2012-09-12 08:08:51.000
2012-09-11 13:45:21.000
2012-09-11 11:50:25.000
2012-09-07 11:20:04.000
2012-09-10 07:14:00.000
2012-09-21 07:44:42.000
2012-09-20 09:16:42.000
2012-09-26 08:16:47.000
2012-09-19 07:12:09.000
2012-09-19 10:20:56.000
2012-09-20 07:09:52.000
2012-08-30 12:44:45.000
2012-08-30 09:28:54.000
2012-09-18 14:34:16.000
2012-09-24 11:24:34.000
2012-09-18 09:48:22.000
2012-09-25 13:20:09.000
2012-09-25 08:53:46.000
2012-09-18 09:09:56.000
2012-09-18 09:25:22.000
2012-08-20 09:10:32.000
2012-08-20 08:56:04.000
2012-08-24 09:11:42.000
2012-10-16 08:57:19.000
2012-09-21 07:40:51.000
2012-08-31 11:26:52.000
2012-08-31 09:17:25.000
2012-08-31 11:12:29.000
2012-08-31 11:11:49.000
2012-09-04 10:51:37.000
2012-08-30 10:18:40.000
2012-10-01 09:06:42.000
2012-09-13 08:55:03.000
2012-09-25 13:25:04.000
2012-09-25 11:53:26.000
2012-08-28 10:03:50.000
2012-08-23 09:45:38.000
2012-08-22 14:31:09.000
2012-08-23 08:51:19.000
2012-09-14 11:00:27.000
2012-09-12 09:51:11.000
2012-09-13 09:49:20.000
2012-09-12 06:55:34.000
2012-09-11 12:46:49.000
2012-08-24 06:52:59.000
2012-08-24 14:48:53.000
2012-08-24 10:20:41.000
2012-08-24 11:25:37.000
2012-08-29 10:07:33.000
2012-09-13 07:59:41.000
2012-09-12 13:32:48.000
2012-09-12 13:04:24.000
2012-09-13 07:02:45.000
2012-09-12 06:40:30.000
2012-09-12 10:52:42.000
2012-09-12 07:25:37.000
2012-09-12 09:59:38.000
2012-09-20 12:56:40.000
2012-09-20 08:46:10.000
2012-08-23 13:17:50.000
2012-08-23 11:47:16.000
2012-08-29 10:14:29.000
2012-08-29 06:37:54.000
2012-09-11 13:57:26.000
2012-09-04 09:24:34.000
2012-09-03 13:20:53.000
2012-10-24 12:50:55.000
2012-09-12 09:03:36.000
2012-09-11 14:19:52.000
2012-09-18 14:38:08.000
2012-09-19 09:01:31.000
2012-09-18 09:34:43.000
2012-09-18 09:36:36.000
2012-08-31 10:16:29.000
2012-10-18 12:50:15.000
2012-09-03 13:28:54.000
2012-09-10 06:40:05.000
2012-09-17 12:26:02.000
2012-09-14 07:21:37.000
2012-09-03 06:05:44.000
2012-08-31 09:37:56.000
2012-09-03 14:31:14.000
2012-09-18 14:09:20.000
2012-09-05 12:55:46.000
2012-08-24 09:14:16.000
2012-08-24 12:53:22.000
2012-08-24 12:53:36.000
2012-08-27 06:17:50.000
2012-09-20 11:37:53.000
2012-09-19 14:51:58.000
2012-09-20 09:51:57.000
2012-08-24 08:08:26.000
2012-08-27 06:50:33.000
2012-08-24 12:20:03.000
2012-08-27 14:38:43.000
2012-08-24 12:20:28.000
2012-08-30 11:03:20.000
2012-08-30 07:43:16.000
2012-08-24 11:20:38.000
2012-08-24 14:42:37.000
2012-08-24 14:42:53.000
2012-08-29 11:10:47.000
2012-08-29 10:29:56.000
2012-08-31 06:32:58.000
2012-08-30 12:44:55.000
2012-09-12 14:39:21.000
2012-09-12 11:35:32.000
2012-09-12 13:43:59.000
2012-09-13 07:30:49.000
2012-09-12 13:03:33.000
2012-09-13 06:34:17.000
2012-09-12 12:49:19.000
2012-09-12 10:15:20.000
2012-09-12 11:19:37.000
2012-08-20 11:44:01.000
2012-08-23 12:37:31.000
2012-08-24 06:54:38.000
2012-08-24 06:20:49.000
2012-09-04 09:55:59.000
2012-08-29 06:17:22.000
2012-08-28 12:25:16.000
2012-08-28 14:45:20.000
2012-09-04 12:44:59.000
2012-09-25 09:45:01.000
2012-10-12 07:32:39.000
2012-08-21 11:13:13.000
2012-08-22 12:44:07.000
2012-08-30 14:35:05.000
2012-08-31 07:06:41.000
2012-09-06 11:35:16.000
2012-09-10 09:07:10.000
2012-09-10 13:50:30.000
2012-09-11 11:15:21.000
2012-09-11 12:41:49.000
2012-09-13 10:53:40.000
2012-09-13 10:53:30.000
2012-09-19 10:04:08.000
2012-08-24 09:10:43.000
2012-08-24 07:55:11.000
2012-11-09 09:35:18.000
2012-09-11 13:30:53.000
2012-10-08 12:27:30.000
2012-10-08 11:32:29.000
2012-10-08 07:56:50.000
2012-08-22 15:17:27.000
2012-08-22 09:49:12.000
2012-08-22 14:24:09.000
2012-08-22 15:50:08.000
2012-08-20 14:11:13.000
2012-08-23 15:11:42.000
2012-08-24 13:03:56.000
2012-08-24 09:27:30.000
2012-08-28 07:24:17.000
2012-08-24 11:05:43.000
2012-08-24 11:05:58.000
2012-10-15 10:08:39.000
2012-08-28 11:43:13.000
2012-08-28 07:35:26.000
2012-10-22 10:31:53.000
2012-09-20 09:23:36.000
2012-09-24 07:34:21.000
2012-09-20 10:56:40.000
2012-10-11 14:03:30.000
2012-10-11 07:55:55.000
2012-10-11 11:30:04.000
2012-10-12 07:56:43.000
2012-10-11 13:59:41.000
2012-10-12 07:54:50.000
2012-10-11 14:00:02.000
2012-08-24 06:38:41.000
2012-08-24 14:31:42.000
2012-08-24 10:04:35.000
2012-08-24 13:35:03.000
2012-08-24 13:35:51.000
2012-09-25 06:24:18.000
2012-09-05 10:19:15.000
2012-09-05 10:15:43.000
2012-08-21 05:50:10.000
2012-08-20 15:46:47.000
2012-08-21 05:48:45.000
2012-08-21 10:31:59.000
2012-08-20 15:48:40.000
2012-09-21 06:50:46.000
2012-09-21 08:56:55.000
2012-09-21 07:47:10.000
2012-09-25 14:37:54.000
2012-09-25 14:38:22.000
2012-09-25 13:31:09.000
2012-08-20 10:22:28.000
2012-09-25 07:19:42.000
2012-09-25 08:56:29.000
2012-10-05 11:11:05.000
2012-10-05 11:10:56.000
2012-09-28 11:28:20.000
2012-08-22 14:48:00.000
2012-09-17 07:25:38.000
2012-09-13 10:05:02.000
2012-08-22 11:21:01.000
2012-08-22 06:40:35.000
2012-08-22 11:21:46.000
2012-08-22 05:51:17.000
2012-09-21 09:13:02.000
2012-08-28 15:02:09.000
2012-08-28 11:14:37.000
2012-08-24 06:24:27.000
2012-08-24 13:57:01.000
2012-08-24 09:50:37.000
2012-08-27 13:06:43.000
2012-08-24 08:24:36.000
2012-08-27 07:21:43.000
2012-08-29 11:34:19.000
2012-08-28 09:09:58.000
2012-08-27 13:04:17.000
2012-08-27 13:06:33.000
2012-08-27 13:07:44.000
2012-09-05 08:53:55.000
2012-09-05 08:58:27.000
2012-09-05 08:55:31.000
2012-09-05 13:18:22.000
2012-09-17 09:16:19.000
2012-09-17 14:39:39.000
2012-09-17 14:40:00.000
2012-10-03 07:43:28.000
2012-09-06 10:38:52.000
2012-10-01 12:39:28.000
2012-10-02 08:17:04.000
2012-08-29 14:02:27.000
2012-08-29 12:39:20.000
2012-08-30 11:00:56.000
2012-08-30 11:05:18.000
2012-08-29 10:35:03.000
2012-08-29 10:33:48.000
2012-08-29 10:34:26.000
2012-09-07 11:40:44.000
2012-08-21 08:57:53.000
2012-08-21 08:56:59.000
2012-08-21 12:07:28.000
2012-11-06 10:04:43.000
2012-10-02 08:00:08.000
2012-10-02 11:06:04.000
2012-10-02 08:01:37.000
2012-10-15 07:32:35.000
2012-10-15 07:31:54.000
2012-10-12 10:25:54.000
2012-08-21 11:43:35.000
2012-08-21 11:42:42.000
2012-08-22 07:44:07.000
2012-09-17 06:34:44.000
2012-09-13 12:55:52.000
2012-09-13 11:32:53.000
2012-10-01 11:05:37.000
2012-10-01 11:06:50.000
2012-10-01 11:08:04.000
2012-10-01 13:19:18.000
2012-10-01 11:04:33.000
2012-08-24 10:09:04.000
2012-08-24 10:13:22.000
2012-08-29 13:07:35.000
2012-08-28 14:26:00.000
2012-08-28 15:22:58.000
2012-08-28 12:32:50.000
2012-09-24 07:17:04.000
2012-09-24 07:02:45.000
2012-08-24 12:42:55.000
2012-08-27 06:25:43.000
2012-09-05 13:04:20.000
2012-09-05 07:14:14.000
2012-08-21 13:20:06.000
2012-08-20 08:04:18.000
2012-08-20 08:02:54.000
2012-08-20 08:03:23.000
2012-08-23 09:50:29.000
2012-08-22 09:42:27.000
2012-08-23 06:54:55.000
2012-08-23 06:55:17.000
2012-08-23 06:54:37.000
2012-08-25 11:33:49.000
2012-08-23 15:13:39.000
2012-11-05 14:20:13.000
2012-11-05 11:10:35.000
2012-10-01 13:28:10.000
2012-10-01 10:04:24.000
2012-10-01 13:27:22.000
2012-10-02 06:19:16.000
2012-10-02 13:27:37.000
2012-10-02 09:38:20.000
2012-08-31 08:22:34.000
2012-08-24 15:12:23.000
2012-08-24 15:19:29.000
2012-08-24 10:41:26.000
2012-08-24 10:41:56.000
2012-08-24 14:10:09.000
2012-10-08 09:20:51.000
2012-10-08 07:10:48.000
2012-10-08 12:39:21.000
2012-10-08 08:55:08.000
2012-10-08 12:38:16.000
2012-10-08 08:54:58.000
2012-08-27 06:44:55.000
2012-08-27 06:44:23.000
2012-09-28 07:18:14.000
2012-09-28 07:19:19.000
2012-10-01 11:23:13.000
2012-10-01 11:23:50.000
2012-10-01 10:36:52.000
2012-10-01 11:23:30.000
2012-10-01 13:56:01.000
2012-09-10 08:53:49.000
2012-08-21 10:20:34.000
2012-08-21 10:20:12.000
2012-08-21 13:53:35.000
2012-08-22 06:24:23.000
2012-08-22 06:24:42.000
2012-08-22 06:25:07.000
2012-08-22 06:26:16.000
2012-10-01 09:59:34.000
2012-08-23 08:28:59.000
2012-08-23 08:28:36.000
2012-08-23 08:28:18.000
2012-10-08 10:22:02.000
2012-10-08 08:03:21.000
2012-08-23 10:37:07.000
2012-08-23 10:37:49.000
2012-08-23 10:36:12.000
2012-09-27 08:27:35.000
2012-09-17 14:08:47.000
2012-09-17 07:14:01.000
2012-09-13 13:50:09.000
2012-09-13 12:57:04.000
2012-08-24 12:51:49.000
2012-09-18 06:16:12.000
2012-10-02 08:03:13.000
2012-10-02 08:04:04.000
2012-10-02 06:20:44.000
2012-09-18 06:32:20.000
2012-09-25 13:15:11.000
2012-09-26 07:16:21.000
2012-09-26 06:40:08.000
2012-09-26 06:40:19.000
2012-09-26 09:59:43.000
2012-10-05 11:48:53.000
2012-10-05 11:48:44.000
2012-08-21 13:32:58.000
2012-08-21 11:05:31.000
2012-08-20 15:12:29.000
2012-08-20 15:15:32.000
2012-08-21 13:59:21.000
2012-08-21 11:30:29.000
2012-10-23 07:43:46.000
2012-10-15 06:57:20.000
2012-10-12 07:26:26.000
2012-10-12 07:26:36.000
2012-09-13 11:10:59.000
2012-09-13 10:28:32.000
2012-09-11 06:18:43.000
2012-09-10 13:10:45.000
2012-09-10 08:24:45.000
2012-08-22 07:57:01.000
2012-08-23 06:19:36.000
2012-09-21 08:50:17.000
2012-09-21 09:47:59.000
2012-10-01 07:42:00.000
2012-10-11 09:28:54.000
2012-09-19 14:01:17.000
2012-09-20 08:59:24.000
2012-09-20 08:59:44.000
2012-09-20 09:56:29.000
2012-10-09 13:08:55.000
2012-10-09 13:46:24.000
2012-09-19 13:12:47.000
2012-09-19 13:11:02.000
2012-10-10 11:53:10.000
2012-10-09 06:37:43.000
2012-10-08 12:32:23.000
2012-09-27 09:17:53.000
2012-08-23 14:30:27.000
2012-08-23 09:12:09.000
2012-08-23 09:42:54.000
2012-08-23 14:36:30.000
2012-08-24 06:44:56.000
2012-10-02 06:58:07.000
2012-08-24 07:46:29.000
2012-10-02 14:02:31.000
2012-08-29 09:08:36.000
2012-08-29 14:40:18.000
2012-08-21 08:47:47.000
2012-08-21 08:46:15.000
2012-08-21 13:25:35.000
2012-08-21 11:46:16.000
2012-10-17 14:12:27.000
2012-10-16 09:41:30.000
2012-10-17 13:51:37.000
2012-10-01 08:22:16.000
2012-08-23 07:20:43.000
2012-08-23 07:20:10.000
2012-08-22 11:13:09.000
2012-08-23 09:01:23.000
2012-08-23 06:20:31.000
2012-08-23 13:55:50.000
2012-08-23 08:26:09.000
2012-08-23 09:16:13.000
2012-08-23 12:57:45.000
2012-10-03 06:54:16.000
2012-10-03 07:52:59.000
2012-10-03 07:14:09.000
2012-09-24 09:50:03.000
2012-09-25 13:01:13.000
2012-09-25 11:26:46.000
2012-10-11 06:54:08.000
2012-10-11 10:01:41.000
2012-09-11 12:33:34.000
2012-09-07 11:12:42.000
2012-09-10 06:31:19.000
2012-08-20 15:15:13.000
2012-08-21 10:51:15.000
2012-08-23 09:56:58.000
2012-08-21 08:51:41.000
2012-08-20 15:14:54.000
2012-09-12 11:10:17.000
2012-09-12 08:34:45.000
2012-09-18 07:51:15.000
2012-10-18 09:18:21.000
2012-10-18 13:47:41.000
2012-10-18 09:21:33.000
2012-10-18 09:18:32.000
2012-08-21 09:10:39.000
2012-08-21 12:45:57.000
2012-08-30 11:22:44.000
2012-09-26 07:15:02.000
2012-09-25 11:49:26.000
2012-09-26 06:23:59.000
2012-09-25 11:50:01.000
2012-09-04 07:29:37.000
2012-08-24 13:55:42.000
2012-08-27 09:15:53.000
2012-08-24 09:50:03.000
2012-08-24 08:53:42.000
2012-09-03 10:14:30.000
2012-09-03 12:16:41.000
2012-09-07 11:25:40.000
2012-09-07 08:07:57.000
2012-09-07 08:14:08.000
2012-09-07 11:27:03.000
2012-09-10 09:03:18.000
2012-09-07 10:31:23.000
2012-09-11 09:21:33.000
2012-09-10 14:08:33.000
2012-09-12 07:14:57.000
2012-09-11 12:51:32.000
2012-08-27 13:50:02.000
2012-08-27 10:21:05.000
2012-08-27 10:09:48.000
2012-09-11 10:48:55.000
2012-09-11 06:32:42.000
2012-09-11 11:05:27.000
2012-09-11 06:51:53.000
2012-09-13 08:03:12.000
2012-09-13 09:13:38.000
2012-09-17 06:33:01.000
2012-09-21 07:25:41.000
2012-09-20 14:32:24.000
2012-09-25 11:35:10.000
2012-09-25 10:34:55.000
2012-09-24 10:39:04.000
2012-09-24 10:33:59.000
2012-09-21 07:18:35.000
2012-10-02 14:14:18.000
2012-10-03 10:52:05.000
2012-08-20 08:22:32.000
2012-08-20 13:05:16.000
2012-09-12 11:37:09.000
2012-09-12 09:02:41.000
2012-09-12 14:06:24.000
2012-09-12 14:06:55.000
2012-10-15 06:29:11.000
2012-10-12 07:09:41.000
2012-10-12 07:09:54.000
2012-08-24 14:33:32.000
2012-08-24 15:07:20.000
2012-08-24 14:31:01.000
2012-08-24 14:31:16.000
2012-08-27 09:25:42.000
2012-08-29 06:36:07.000
2012-08-28 15:00:05.000
2012-08-24 11:56:23.000
2012-08-24 08:59:53.000
2012-08-24 13:16:02.000
2012-08-24 09:35:34.000
2012-09-13 12:57:22.000
2012-09-13 10:39:55.000
2012-09-11 09:54:07.000
2012-09-05 15:03:28.000
2012-09-05 11:27:47.000
2012-09-27 11:04:23.000
2012-09-04 10:55:12.000
2012-09-04 14:16:59.000
2012-09-11 14:44:50.000
2012-09-11 13:42:11.000
2012-09-12 08:10:35.000
2012-09-12 09:27:22.000
2012-09-11 14:37:42.000
2012-09-12 09:08:30.000
2012-09-12 10:52:11.000
2012-09-12 09:59:18.000
2012-09-12 06:20:52.000
2012-09-12 09:42:55.000
2012-09-12 10:36:47.000
2012-09-12 07:12:38.000
2012-09-12 10:20:03.000
2012-09-12 10:30:31.000
2012-09-12 11:16:19.000
2012-09-12 07:46:05.000
2012-09-12 14:19:33.000
2012-09-13 06:17:16.000
2012-09-12 12:30:22.000
2012-08-30 13:44:15.000
2012-08-30 10:05:11.000
2012-09-03 14:35:03.000
2012-10-11 08:08:04.000
2012-10-10 13:06:21.000
2012-10-11 07:06:41.000
2012-10-12 09:13:47.000
2012-10-15 06:21:29.000
2012-10-15 06:20:59.000
2012-08-28 08:05:03.000
2012-10-11 08:24:38.000
2012-10-11 09:02:34.000
2012-10-11 11:54:40.000
2012-10-12 06:16:10.000
2012-10-12 09:41:03.000
2012-10-12 06:15:49.000
2012-10-12 06:16:32.000
2012-10-12 09:41:16.000
2012-10-18 06:09:01.000
2012-10-11 09:15:11.000
2012-10-11 09:14:27.000
2012-10-11 12:53:02.000
2012-10-11 09:15:54.000
2012-08-21 13:28:18.000
2012-08-21 13:27:29.000
2012-08-21 13:27:58.000
2012-09-27 07:43:31.000
2012-08-29 13:46:42.000
2012-08-30 09:35:51.000
2012-08-30 09:36:03.000
2012-09-13 07:21:59.000
2012-09-12 12:33:17.000
2012-09-12 11:36:48.000
2012-08-28 09:26:43.000
2012-08-29 10:51:25.000
2012-08-28 09:57:12.000
2012-08-29 10:07:37.000
2012-08-29 09:41:20.000
2012-08-29 09:42:01.000
2012-10-12 07:43:10.000
2012-10-12 11:14:57.000
2012-10-12 07:43:40.000
2012-10-15 07:11:26.000
2012-10-12 11:14:02.000
2012-08-28 07:39:00.000
2012-08-27 13:18:42.000
2012-08-28 13:03:18.000
2012-08-28 08:20:38.000
2012-08-28 13:38:30.000
2012-08-28 14:59:42.000
2012-10-10 12:40:44.000
2012-10-12 09:49:40.000
2012-10-15 06:57:02.000
2012-10-12 09:49:31.000
2012-10-15 06:56:26.000
2012-10-12 09:50:49.000
2012-09-27 13:23:19.000
2012-08-28 14:04:27.000
2012-08-27 06:23:21.000
2012-08-24 11:26:15.000
2012-08-24 11:26:34.000
2012-08-24 14:47:08.000
2012-08-24 14:47:42.000
2012-08-24 14:46:37.000
2012-10-09 09:47:09.000
2012-10-09 07:39:02.000
2012-09-05 09:29:58.000
2012-09-13 07:53:19.000
2012-09-12 13:24:18.000
2012-09-13 10:39:51.000
2012-08-21 10:58:32.000
2012-08-21 13:29:25.000
2012-08-21 07:19:56.000
2012-08-22 11:09:15.000
2012-08-21 11:51:53.000
2012-08-21 10:44:30.000
2012-09-19 09:51:21.000
2012-09-20 06:30:51.000
2012-09-20 10:08:25.000
2012-09-25 09:11:14.000
2012-09-24 14:25:18.000
2012-10-24 14:31:12.000
2012-08-24 07:26:29.000
2012-08-24 11:34:59.000
2012-08-24 07:26:08.000
2012-08-21 09:32:56.000
2012-08-21 09:32:02.000
2012-08-21 13:07:35.000
2012-08-24 09:26:45.000
2012-09-11 06:02:57.000
2012-09-10 12:32:29.000
2012-09-10 10:41:45.000
2012-09-04 11:09:38.000
2012-08-31 08:58:38.000
2012-08-31 09:09:38.000
2012-09-11 06:24:45.000
2012-09-10 12:29:31.000
2012-09-10 10:57:57.000
2012-09-11 07:25:23.000
2012-09-10 13:34:45.000
2012-09-10 12:40:05.000
2012-09-19 11:57:55.000
2012-09-19 08:13:24.000
2012-09-25 13:58:33.000
2012-09-25 12:52:39.000
2012-09-26 07:52:35.000
2012-11-15 13:06:35.000
2012-08-31 08:01:15.000
2012-08-31 08:02:16.000
2012-08-30 14:14:22.000
2012-08-30 14:12:21.000
2012-08-31 10:04:21.000
2012-10-08 13:06:33.000
2012-10-08 09:23:29.000
2012-09-25 13:34:46.000
2012-09-26 07:34:25.000
2012-10-01 06:17:03.000
2012-10-18 06:25:18.000
2012-08-23 12:52:52.000
2012-08-23 10:34:59.000
2012-09-21 11:30:07.000
2012-09-24 11:13:10.000
2012-10-03 11:05:26.000
2012-10-03 11:04:06.000
2012-08-20 11:16:55.000
2012-08-20 11:17:33.000
2012-10-10 13:47:37.000
2012-10-11 07:33:42.000
2012-09-11 13:39:35.000
2012-09-11 14:18:19.000
2012-10-11 06:30:03.000
2012-10-11 09:36:18.000
2012-10-15 11:00:45.000
2012-10-15 07:45:33.000
2012-10-15 07:45:52.000
2012-10-15 11:00:13.000
2012-10-15 07:48:57.000
2012-10-12 06:28:51.000
2012-10-12 06:29:55.000
2012-10-12 06:31:05.000
2012-09-24 11:36:07.000
2012-09-20 07:21:57.000
2012-09-24 11:36:24.000
2012-09-04 12:48:17.000
2012-09-04 13:12:20.000
2012-09-07 09:47:04.000
2012-09-06 13:33:20.000
2012-09-07 09:53:53.000
2012-10-12 10:11:23.000
2012-10-15 07:23:06.000
2012-10-12 10:11:13.000
2012-10-15 07:22:36.000
2012-10-12 10:11:03.000
2012-09-06 06:03:59.000
2012-09-06 06:52:58.000
2012-09-04 14:21:14.000
2012-09-06 06:03:04.000
2012-10-22 08:23:33.000
2012-09-25 13:35:53.000
2012-09-25 12:38:30.000
2012-09-25 09:10:35.000
2012-09-25 14:40:18.000
2012-09-24 09:36:31.000
2012-10-12 06:30:52.000
2012-09-19 07:33:38.000
2012-09-19 08:50:07.000
2012-09-18 13:43:22.000
2012-09-24 13:53:25.000
2012-09-25 06:51:07.000
2012-09-24 09:44:18.000
2012-09-24 13:53:12.000
2012-09-13 07:57:27.000
2012-10-09 13:23:15.000
2012-10-10 08:25:50.000
2012-10-09 13:25:11.000
2012-10-09 13:24:16.000
2012-10-10 06:04:25.000
2012-10-10 06:25:49.000
2012-10-10 11:31:30.000
2012-10-11 14:44:59.000
2012-10-12 09:05:10.000
2012-10-11 14:44:39.000
2012-10-12 09:04:35.000
2012-09-17 11:17:14.000
2012-09-25 10:17:02.000
2012-09-26 11:11:01.000
2012-09-25 09:11:53.000
2012-09-26 06:47:16.000
2012-09-25 14:46:31.000
2012-09-27 11:18:26.000
2012-09-26 07:52:08.000
2012-09-25 12:59:21.000
2012-09-26 06:56:33.000
2012-10-15 08:27:11.000
2012-10-15 08:26:51.000
2012-09-06 14:09:10.000
2012-09-17 07:59:23.000
2012-09-17 07:59:47.000
2012-09-13 13:40:22.000
2012-08-28 10:44:20.000
2012-08-28 10:43:43.000
2012-08-30 07:56:51.000
2012-08-29 13:02:24.000
2012-08-23 10:51:46.000
2012-08-23 10:02:12.000
2012-08-23 10:01:17.000
2012-08-23 07:26:06.000
2012-08-23 07:26:03.000
2012-08-23 11:40:20.000
2012-08-23 11:41:07.000
2012-08-23 13:58:19.000
2012-08-24 14:27:15.000
2012-08-24 14:27:46.000
2012-08-27 07:46:24.000
2012-08-24 14:53:05.000
2012-08-24 14:53:34.000
2012-08-27 08:19:16.000
2012-08-30 10:52:53.000
2012-09-05 09:50:18.000
2012-09-05 09:42:30.000
2012-09-05 09:57:33.000
2012-09-05 13:00:34.000
2012-09-05 06:46:48.000
2012-09-11 07:43:22.000
2012-09-10 12:58:16.000
2012-09-18 13:04:20.000
2012-09-13 06:52:36.000
2012-09-12 08:25:42.000
2012-09-25 11:38:21.000
2012-09-25 10:45:15.000
2012-11-08 10:53:13.000
2012-11-12 09:06:19.000
2012-09-10 07:06:05.000
2012-09-10 06:13:04.000
2012-09-06 09:57:10.000
2012-09-06 11:07:21.000
2012-09-12 11:27:49.000
2012-09-12 08:19:39.000
2012-09-12 13:03:26.000
2012-09-12 09:12:41.000
2012-09-10 13:38:20.000
2012-09-10 10:46:09.000
2012-09-11 06:21:15.000
2012-09-10 14:27:54.000
2012-09-10 09:34:17.000
2012-09-24 06:16:46.000
2012-09-24 07:18:45.000
2012-10-03 09:39:24.000
2012-10-01 12:42:20.000
2012-10-02 06:36:36.000
2012-09-28 09:48:03.000
2012-09-28 10:07:28.000
2012-10-01 08:55:31.000
2012-10-02 08:58:28.000
2012-10-01 09:15:56.000
2012-09-13 10:36:03.000
2012-09-13 11:14:30.000
2012-09-13 10:35:16.000
2012-08-21 10:11:16.000
2012-09-21 11:29:56.000
2012-09-24 08:23:48.000
2012-08-20 14:31:30.000
2012-08-21 10:12:16.000
2012-08-21 08:07:59.000
2012-08-21 08:01:46.000
2012-08-20 14:31:13.000
2012-09-19 06:21:57.000
2012-09-13 10:45:59.000
2012-09-13 10:41:18.000
2012-10-09 07:57:00.000
2012-10-09 11:20:30.000
2012-10-09 07:59:10.000
2012-08-23 10:51:17.000
2012-08-23 11:00:47.000
2012-08-23 15:15:42.000
2012-08-24 07:43:49.000
2012-08-22 11:29:13.000
2012-08-22 13:56:02.000
2012-10-10 13:50:27.000
2012-08-23 12:57:34.000
2012-08-24 07:38:51.000
2012-08-24 09:30:57.000
2012-08-23 13:32:04.000
2012-08-24 08:14:21.000
2012-11-06 13:16:41.000
2012-08-22 09:12:29.000
2012-08-22 10:08:06.000
2012-08-21 14:24:37.000
2012-10-01 11:54:44.000
2012-10-02 06:15:11.000
2012-08-20 10:57:26.000
2012-09-28 09:01:15.000
2012-09-28 08:59:23.000
2012-09-28 10:47:15.000
2012-10-17 13:54:51.000
2012-08-20 15:20:20.000
2012-08-21 07:40:26.000
2012-08-20 11:50:09.000
2012-08-20 11:52:07.000
2012-08-23 06:11:18.000
2012-08-22 11:10:19.000
2012-09-17 12:01:32.000
2012-08-23 13:36:39.000
2012-08-23 13:35:59.000
2012-08-31 12:37:53.000
2012-08-23 07:35:00.000
2012-08-23 07:57:32.000
2012-08-23 12:42:17.000
2012-09-24 09:36:57.000
2012-09-20 07:37:30.000
2012-10-03 12:48:08.000
2012-10-19 09:54:23.000
2012-10-18 14:33:43.000
2012-10-02 14:23:55.000
2012-09-17 08:57:28.000
2012-09-13 14:14:57.000
2012-09-20 14:42:10.000
2012-10-08 08:07:55.000
2012-10-08 11:24:04.000
2012-10-08 08:07:36.000
2012-11-07 12:47:41.000
2012-09-24 09:38:10.000
2012-09-24 10:31:34.000
2012-09-24 09:34:03.000
2012-09-19 14:08:29.000
2012-09-24 09:34:43.000
2012-09-19 14:42:59.000
2012-09-13 10:17:20.000
2012-08-21 14:26:28.000
2012-08-21 14:20:25.000
2012-08-21 10:47:30.000
2012-08-21 10:47:49.000
2012-08-21 14:20:33.000
2012-08-24 10:38:19.000
2012-08-24 10:43:07.000
2012-09-26 06:21:25.000
2012-09-26 06:20:18.000
2012-09-26 09:35:28.000
2012-09-28 08:07:28.000
2012-10-02 08:17:50.000
2012-10-02 11:32:38.000
2012-09-20 11:14:18.000
2012-09-20 07:49:57.000
2012-09-10 14:02:45.000
2012-09-10 10:10:29.000
2012-09-11 05:59:33.000
2012-11-06 12:03:02.000
2012-11-06 14:25:31.000
2012-08-24 13:02:26.000
2012-08-24 13:03:06.000
2012-09-26 13:43:47.000
2012-11-06 08:59:41.000
2012-09-18 08:09:39.000
2012-08-24 15:26:27.000
2012-08-27 06:20:16.000
2012-08-27 10:04:07.000
2012-08-24 14:01:51.000
2012-08-24 14:04:11.000
2012-08-27 09:05:12.000
2012-09-28 06:38:46.000
2012-09-28 06:57:12.000
2012-10-02 13:41:00.000

i want to group by this column to have just one date instead of several. for example just one 2012-10-02.





quote:
Originally posted by mana




hello
i changed the code
update AMPPU_Alle_Fehlteile
set [Zeit Fehler Ein] =
(select Convert(varchar(4),DATEPART(year, Zeit_Fehler_EIN)) +
'/'+ Convert(varchar(2),DATEPART(MONTH, Zeit_Fehler_EIN)) + '/' +
Convert(varchar(2),DATEPART(DAY, Zeit_Fehler_EIN)) from AMPPU_Alle_Fehlteile);

but it has still the problem:
Msg 512, Level 16, State 1, Line 1
The subquery returned more than one value. This is not permitted when the subquery follows =,! =, <, <=,> Or> = follows or is used as an expression.
The statement has been terminated.


can you guide me please?






quote:
Originally posted by mana


hello,
i have the following code but it has error
insert into AMPPU_Alle_Fehlteile([Zeit Fehler Ein])
select Convert(varchar(4),DATEPART(year, Zeit_Fehler_EIN)) +
'/'+ Convert(varchar(2),DATEPART(MONTH, Zeit_Fehler_EIN)) + '/' +
Convert(varchar(2),DATEPART(DAY, Zeit_Fehler_EIN)) from AMPPU_Alle_Fehlteile;

it has this errror
Msg 515, Level 16, State 2, Line 1
The value NULL can not be inserted in the order column, Reporting.dbo.AMPPU_Alle_Fehlteile table. The column does not allow NULL values. Error in INSERT.
The statement has been terminated.


can you guide me please?







quote:
Originally posted by mana

hello
thank you very much for your help
it works now
do you know how i cna get just the date part of a date time field in sql server or access?
my column is like this :
2012-08-20 08:02:54.000
but i just need the 2012-08-20
can you help me please?





quote:
Originally posted by MichaelJSQL

OK - So your code is working and you were going to run it periodically by using a SQL agent job. Let me know if you need help with that.

Before you export data - have you considered using a linked table to the SQL Server. If you link to AMPPU_Alle_Fehlteile from Access , there would be no reason to push data as the table is always looking at the SQL Server table. Is that an option?







Go to Top of Page

MichaelJSQL
Posting Yak Master

172 Posts

Posted - 07/31/2014 :  08:36:42  Show Profile  Reply with Quote
hello
thank you very much for your help
it works now
do you know how i cna get just the date part of a date time field in sql server or access?
my column is like this :
2012-08-20 08:02:54.000
but i just need the 2012-08-20
can you help me please?

Yes, cast as a date

SELECT CAST('2012-08-20 08:02:54.000' AS DATE)
Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 07/31/2014 :  09:05:36  Show Profile  Reply with Quote

but wehn i want to add it to a column i have this error
Msg 512, Level 16, State 1, Line 1
The subquery returned more than one value. This is not permitted when the subquery follows =,! =, <, <=,> Or> = follows or is used as an expression.
The statement has been terminated

quote:
Originally posted by MichaelJSQL

hello
thank you very much for your help
it works now
do you know how i cna get just the date part of a date time field in sql server or access?
my column is like this :
2012-08-20 08:02:54.000
but i just need the 2012-08-20
can you help me please?

Yes, cast as a date

SELECT CAST('2012-08-20 08:02:54.000' AS DATE)

Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 07/31/2014 :  09:16:08  Show Profile  Reply with Quote

Do you know how i can write this in acccess? itried it but it didn't work.




quote:
Originally posted by mana


but wehn i want to add it to a column i have this error
Msg 512, Level 16, State 1, Line 1
The subquery returned more than one value. This is not permitted when the subquery follows =,! =, <, <=,> Or> = follows or is used as an expression.
The statement has been terminated

quote:
Originally posted by MichaelJSQL

hello
thank you very much for your help
it works now
do you know how i cna get just the date part of a date time field in sql server or access?
my column is like this :
2012-08-20 08:02:54.000
but i just need the 2012-08-20
can you help me please?

Yes, cast as a date

SELECT CAST('2012-08-20 08:02:54.000' AS DATE)



Go to Top of Page

MichaelJSQL
Posting Yak Master

172 Posts

Posted - 07/31/2014 :  09:46:05  Show Profile  Reply with Quote
I understand the error you are getting and why, but I don't have the SQL Code. Could you post the SQL Code that is causing this error:

but wehn i want to add it to a column i have this error
Msg 512, Level 16, State 1, Line 1
The subquery returned more than one value. This is not permitted when the subquery follows =,! =, <, <=,> Or> = follows or is used as an expression.
The statement has been terminated

I will look and see how it can be written in access as well.
Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 07/31/2014 :  09:50:53  Show Profile  Reply with Quote

this is the code:

update AMPPU_Alle_Fehlteile
set [Zeit Fehler Ein] =
(select CAST(Zeit_Fehler_EIN as date) from AMPPU_Alle_Fehlteile);





quote:
Originally posted by MichaelJSQL

I understand the error you are getting and why, but I don't have the SQL Code. Could you post the SQL Code that is causing this error:

but wehn i want to add it to a column i have this error
Msg 512, Level 16, State 1, Line 1
The subquery returned more than one value. This is not permitted when the subquery follows =,! =, <, <=,> Or> = follows or is used as an expression.
The statement has been terminated

I will look and see how it can be written in access as well.

Go to Top of Page

MichaelJSQL
Posting Yak Master

172 Posts

Posted - 07/31/2014 :  10:59:13  Show Profile  Reply with Quote
Ok - here is the issue - Your Sub query is returning more than 1 row and you are using an "=" , which means you expect to get 1 value.

You do not need a sub query to do this. You are just casting a column to date to remove datetime. So all you need is the following

update AMPPU_Alle_Fehlteile
set [Zeit Fehler Ein] =CAST(Zeit_Fehler_EIN as date)
Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 08/01/2014 :  03:20:56  Show Profile  Reply with Quote













hello thank you very much, it works now.
I have a question in access. I have a form and there is a combox in it that has values from a table:

combox root_cause:
SELECT dbo_AMPPU_Root_Cause.Root_Cause
FROM dbo_AMPPU_Root_Cause
ORDER BY dbo_AMPPU_Root_Cause.Root_Cause;



I HAVE ANOTHER combobox and i the values of that are linked in a table to the uppper combobox.I WRITE THE BELOW COD FOR IT; BUT IT DOESN'T WORK: I Don'T KNOW WHY: CAN YOU HELP ME PLEAE?
COMBOBOX GEGENMASSNAHME.
SELECT dbo_AMPPU_CA_Ursachen_Gegenmassnahme.Gegenmassnahme
FROM dbo_AMPPU_CA_Ursachen_Gegenmassnahme
WHERE (((dbo_AMPPU_CA_Ursachen_Gegenmassnahme.Ursachenanalyse)=[Forms]![frm_Bearbeiten]![cmb-Ursache]));


i HAVE A TABLE THAT IN IT GEGENMASSNAHME AND URSACHEANALYSE ARE LINKED:
THE DATA ARE LIKE BELOW:





Gegenmassnahme URSACHE
2 Video Methode Mangel an Wissen
Arbeitsplatz Organisation ARBEITSPLATZKEIT
Arbeitsplatz Organisation TECKNIK AUFMERKSAMKEI
Arbeitsplatz Organisation PRIVAT
Arbeitsplatz Organisation
Beratung / Einbindung der Mitarbeiter :
Beratung / Einbindung der Mitarbeiter :
CAR :
Deviation :
Kaizen
Kaizen
Kaizen
Kaizen
MTS (Trainingscorner)
NBK
OPL
OPL
OPL
OPL
OPL
Poka Yoke
Poka Yoke
Poka Yoke
Poka Yoke
Poka Yoke
Prozessschulung
SOP
SOP
SOP
SOP
SOP
Training
Training
Training
Visuelle Hilfe
Visuelle Hilfe
Visuelle Hilfe








quote:
Originally posted by MichaelJSQL

Ok - here is the issue - Your Sub query is returning more than 1 row and you are using an "=" , which means you expect to get 1 value.

You do not need a sub query to do this. You are just casting a column to date to remove datetime. So all you need is the following

update AMPPU_Alle_Fehlteile
set [Zeit Fehler Ein] =CAST(Zeit_Fehler_EIN as date)


Go to Top of Page

MichaelJSQL
Posting Yak Master

172 Posts

Posted - 08/01/2014 :  08:19:33  Show Profile  Reply with Quote
Are you trying to implement smart combos(linked) meaning when a person selects a value from one combo box, you want to limit or change the options available in another combo box?
Go to Top of Page

MichaelJSQL
Posting Yak Master

172 Posts

Posted - 08/01/2014 :  14:35:41  Show Profile  Reply with Quote
I would not write a job.

Just link the table using linked table manager:
http://office.microsoft.com/en-us/access-help/import-or-link-to-sql-server-data-HA010200494.aspx#BM2

You will be able to query from the table just like it was part of the access database. It will automatically be kept in synch with your sql server table.
Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 08/06/2014 :  06:47:27  Show Profile  Reply with Quote





hello,

I have a linked table in access and when i open a query i have this message:
scaling of decimal value resulted in data truncation

i don't know what to do? i TRIED TO CHANGE SOME THINGS BUT IT DOESN#T WORK.
What should i do?
thank you







quote:
Originally posted by MichaelJSQL

I would not write a job.

Just link the table using linked table manager:
http://office.microsoft.com/en-us/access-help/import-or-link-to-sql-server-data-HA010200494.aspx#BM2

You will be able to query from the table just like it was part of the access database. It will automatically be kept in synch with your sql server table.

Go to Top of Page

MichaelJSQL
Posting Yak Master

172 Posts

Posted - 08/06/2014 :  07:02:06  Show Profile  Reply with Quote
Check your data type and the end type of the result if your update -- make sure you aren't trying to store a something like 12.573 in a numeric(5,2) or something.

http://office.microsoft.com/en-us/access-help/HV080760858.aspx?CTT=5&origin=HV080756967

here some other folks that have the issue
http://cpltditdays.wordpress.com/2013/08/21/scaling-of-decimal-value-resulted-in-data-truncation/
http://www.utteraccess.com/forum/Scaling-decimal-resulte-t1697540.html
Go to Top of Page

mana
Yak Posting Veteran

86 Posts

Posted - 08/06/2014 :  07:47:19  Show Profile  Reply with Quote









I have this expression


Ausdr1: [dbo_Teile_Verbrauch]![Verbrauch_Zukunft_1]+[dbo_Teile_Verbrauch]![Verbrauch_Zukunft_2]+[dbo_Teile_Verbrauch]![Verbrauch_Zukunft_3]+[dbo_Teile_Verbrauch]![Verbrauch_Zukunft_4]+[dbo_Teile_Verbrauch]![Verbrauch_Zukunft_5]+[dbo_Teile_Verbrauch]![Verbrauch_Zukunft_6]+[dbo_Teile_Verbrauch]![Verbrauch_Zukunft_7]+[dbo_Teile_Verbrauch]![Verbrauch_Zukunft_8]+[dbo_Teile_Verbrauch]![Verbrauch_Zukunft_9]+[dbo_Teile_Verbrauch]![Verbrauch_Zukunft_10]+[dbo_Teile_Verbrauch]![Verbrauch_Zukunft_11]


all of the fields are from decimal 18 and scale 2. But i don't know where the problem is










quote:
Originally posted by MichaelJSQL

Check your data type and the end type of the result if your update -- make sure you aren't trying to store a something like 12.573 in a numeric(5,2) or something.

http://office.microsoft.com/en-us/access-help/HV080760858.aspx?CTT=5&origin=HV080756967

here some other folks that have the issue
http://cpltditdays.wordpress.com/2013/08/21/scaling-of-decimal-value-resulted-in-data-truncation/
http://www.utteraccess.com/forum/Scaling-decimal-resulte-t1697540.html


Go to Top of Page

MichaelJSQL
Posting Yak Master

172 Posts

Posted - 08/06/2014 :  17:02:15  Show Profile  Reply with Quote
I would first try it as a select and make sure the result is appropriate for the precision and scale. ALso check what you have set for precision and scale in the sql server table
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.48 seconds. Powered By: Snitz Forums 2000