Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
select and condition column+column
21 posts, Page 2 of 3
««
1
2
3
»»
select and condition column+column
Rate Topic
Display Mode
Topic Options
Author
Message
anthony.green
anthony.green
Posted Thursday, January 24, 2013 5:55 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
Definition of TB_TRACKING_ABV, TB_WORK_ORDER_AGVEN again with indexes please
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1411094
anthony.green
anthony.green
Posted Thursday, January 24, 2013 6:03 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
Post the query which is giving you performance problems dont keep changing the query.
Then from that query, post the definition of all tables used within that query along with all of their indexes.
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1411100
tony28
tony28
Posted Thursday, January 24, 2013 6:54 AM
Valued Member
Group: General Forum Members
Last Login: Today @ 1:26 AM
Points: 65,
Visits: 199
OK sorry, tommorow i will send direct this query, this is what i wrote second, because i founded after that we need the second.
Now i am not at work, tommorow at 7:00 i will send..
thank you for response
Post #1411114
tony28
tony28
Posted Friday, January 25, 2013 12:09 AM
Valued Member
Group: General Forum Members
Last Login: Today @ 1:26 AM
Points: 65,
Visits: 199
hello, so programmer solved this frozen with thread, but he said me it will be temporary solution if I tune the query, if its possile
so in attachment i add files like on your web, and inside the files are little notices for this
and I forgot. this query is in procedure.
Post Attachments
sqlplan.sqlplan
(
3 views,
51.55 KB
)
table.docx
(
5 views,
23.40 KB
)
tables.xlsx
(
3 views,
32.53 KB
)
Post #1411493
anthony.green
anthony.green
Posted Friday, January 25, 2013 2:05 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
No additional indexes on the tables?
Just primary keys?
Also provide your data in a consumable format, like you have with your tables
E.g.
INSERT INTO TB_WORK_ORDER_ABV VALUES ('dfewrgre','ggergerg','gregergher','gerhreher')
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1411534
tony28
tony28
Posted Friday, January 25, 2013 2:51 AM
Valued Member
Group: General Forum Members
Last Login: Today @ 1:26 AM
Points: 65,
Visits: 199
INSERT INTO [dbo].[TB_WORK_ORDER_AGVEN]
([ORDER_DATE]
,[COMMIT_NO]
,[BODY_NO]
,[STATION_ID]
,[DATA_TYPE]
,[CAR_CODE]
,[WO_SERIALNO]
,[EXT_COLOR]
,[INT_COLOR]
,[FSC_TDATA]
,[BODY_TYPE]
,[DRIVE_TYPE]
,[TRIM_LEVEL]
,[REPORT_DTIME]
,[RCV_TRID]
,[ERP_RCV_IFTIME]
,[PRT_BC_FLAG]
,[PRT_BC_TIME]
,[PRT_TROL_FLAG]
,[PRT_FEED_FLAG]
,[LOAD_FLAG]
,[LOAD_TIME]
,[INSP_FLAG]
,[PROD_FLAG]
,[PROD_SDATE]
,[PROD_ATIME]
,[ERP_PROD_IFTIME]
,[SHIP_FLAG]
,[SHIP_SDATE]
,[SHIP_ATIME]
,[ERP_SHIP_IFTIME]
,[ERP_SD_IFTIME]
,[ERP_DEL_IFTIME]
,[ORDER_DESC])
VALUES
(<ORDER_DATE, char(8),>
,<COMMIT_NO, char(4),>
,<BODY_NO, varchar(12),>
,<STATION_ID, char(4),>
,<DATA_TYPE, char(2),>
,<CAR_CODE, varchar(3),>
,<WO_SERIALNO, varchar(15),>
,<EXT_COLOR, char(3),>
,<INT_COLOR, char(3),>
,<FSC_TDATA, char(29),>
,<BODY_TYPE, char(10),>
,<DRIVE_TYPE, char(6),>
,<TRIM_LEVEL, char(10),>
,<REPORT_DTIME, varchar(14),>
,<RCV_TRID, numeric(10,0),>
,<ERP_RCV_IFTIME, varchar(14),>
,<PRT_BC_FLAG, char(1),>
,<PRT_BC_TIME, varchar(14),>
,<PRT_TROL_FLAG, char(1),>
,<PRT_FEED_FLAG, char(1),>
,<LOAD_FLAG, char(1),>
,<LOAD_TIME, varchar(14),>
,<INSP_FLAG, char(1),>
,<PROD_FLAG, char(1),>
,<PROD_SDATE, char(8),>
,<PROD_ATIME, varchar(14),>
,<ERP_PROD_IFTIME, varchar(14),>
,<SHIP_FLAG, char(1),>
,<SHIP_SDATE, char(8),>
,<SHIP_ATIME, varchar(14),>
,<ERP_SHIP_IFTIME, varchar(14),>
,<ERP_SD_IFTIME, varchar(14),>
,<ERP_DEL_IFTIME, varchar(14),>
,<ORDER_DESC, varchar(30),>)
GO
Post #1411552
tony28
tony28
Posted Friday, January 25, 2013 2:56 AM
Valued Member
Group: General Forum Members
Last Login: Today @ 1:26 AM
Points: 65,
Visits: 199
this ? or you mean the different format of cell in excel ?
i think that you dont need to use this data because from this table we use just 2column for compare if the order exist or no, so if doesnt exist or was canceled( column data type - SN-SD), if it was canceled i dont want select this you know. so you can edit one for SD .
Yes and one point to TRACKING TABLE
IF in Column COMMIT_NO and ORDER_NO is some value, its mean that station is working ( it appear after scan to program)
if isnt it will be in LAST_COMMIT_NO is not working- last finished sequence
Post #1411554
anthony.green
anthony.green
Posted Friday, January 25, 2013 2:59 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
tony28 (1/25/2013)
INSERT INTO [dbo].[TB_WORK_ORDER_AGVEN]
([ORDER_DATE]
,[COMMIT_NO]
,[BODY_NO]
,[STATION_ID]
,[DATA_TYPE]
,[CAR_CODE]
,[WO_SERIALNO]
,[EXT_COLOR]
,[INT_COLOR]
,[FSC_TDATA]
,[BODY_TYPE]
,[DRIVE_TYPE]
,[TRIM_LEVEL]
,[REPORT_DTIME]
,[RCV_TRID]
,[ERP_RCV_IFTIME]
,[PRT_BC_FLAG]
,[PRT_BC_TIME]
,[PRT_TROL_FLAG]
,[PRT_FEED_FLAG]
,[LOAD_FLAG]
,[LOAD_TIME]
,[INSP_FLAG]
,[PROD_FLAG]
,[PROD_SDATE]
,[PROD_ATIME]
,[ERP_PROD_IFTIME]
,[SHIP_FLAG]
,[SHIP_SDATE]
,[SHIP_ATIME]
,[ERP_SHIP_IFTIME]
,[ERP_SD_IFTIME]
,[ERP_DEL_IFTIME]
,[ORDER_DESC])
VALUES
(<ORDER_DATE, char(8),>
,<COMMIT_NO, char(4),>
,<BODY_NO, varchar(12),>
,<STATION_ID, char(4),>
,<DATA_TYPE, char(2),>
,<CAR_CODE, varchar(3),>
,<WO_SERIALNO, varchar(15),>
,<EXT_COLOR, char(3),>
,<INT_COLOR, char(3),>
,<FSC_TDATA, char(29),>
,<BODY_TYPE, char(10),>
,<DRIVE_TYPE, char(6),>
,<TRIM_LEVEL, char(10),>
,<REPORT_DTIME, varchar(14),>
,<RCV_TRID, numeric(10,0),>
,<ERP_RCV_IFTIME, varchar(14),>
,<PRT_BC_FLAG, char(1),>
,<PRT_BC_TIME, varchar(14),>
,<PRT_TROL_FLAG, char(1),>
,<PRT_FEED_FLAG, char(1),>
,<LOAD_FLAG, char(1),>
,<LOAD_TIME, varchar(14),>
,<INSP_FLAG, char(1),>
,<PROD_FLAG, char(1),>
,<PROD_SDATE, char(8),>
,<PROD_ATIME, varchar(14),>
,<ERP_PROD_IFTIME, varchar(14),>
,<SHIP_FLAG, char(1),>
,<SHIP_SDATE, char(8),>
,<SHIP_ATIME, varchar(14),>
,<ERP_SHIP_IFTIME, varchar(14),>
,<ERP_SD_IFTIME, varchar(14),>
,<ERP_DEL_IFTIME, varchar(14),>
,<ORDER_DESC, varchar(30),>)
GO
With the data from the excel sheet.
It should be many lines of INSERT statements
INSERT INTO table VALUE ('20120101','29443','354643',abcd.........................) etc etc etc for all tables
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1411557
tony28
tony28
Posted Friday, January 25, 2013 3:23 AM
Valued Member
Group: General Forum Members
Last Login: Today @ 1:26 AM
Points: 65,
Visits: 199
i think if you copy and paste to "Edit" table, it will appear in table no?
i copy data like this without insert .
Or how can i do this ?
Post #1411573
tony28
tony28
Posted Monday, January 28, 2013 9:29 PM
Valued Member
Group: General Forum Members
Last Login: Today @ 1:26 AM
Points: 65,
Visits: 199
hello,
please can you help me or is not possible ?
thank you for response
Post #1412744
« Prev Topic
|
Next Topic »
21 posts, Page 2 of 3
««
1
2
3
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.