Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


select and condition column+column


select and condition column+column

Author
Message
anthony.green
anthony.green
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6091 Visits: 6071
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
When a question, really isn't a question - Jeff Smith
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


anthony.green
anthony.green
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6091 Visits: 6071
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
When a question, really isn't a question - Jeff Smith
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


tony28
tony28
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 889
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



How to post data/code on a forum to get the best help: Option 1 / Option 2
tony28
tony28
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 889
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.



How to post data/code on a forum to get the best help: Option 1 / Option 2
Attachments
sqlplan.sqlplan (4 views, 51.00 KB)
table.docx (5 views, 23.00 KB)
tables.xlsx (3 views, 32.00 KB)
anthony.green
anthony.green
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6091 Visits: 6071
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
When a question, really isn't a question - Jeff Smith
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


tony28
tony28
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 889
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),>Wink
GO



How to post data/code on a forum to get the best help: Option 1 / Option 2
tony28
tony28
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 889
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



How to post data/code on a forum to get the best help: Option 1 / Option 2
anthony.green
anthony.green
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6091 Visits: 6071
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),>Wink
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
When a question, really isn't a question - Jeff Smith
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


tony28
tony28
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 889
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 ?



How to post data/code on a forum to get the best help: Option 1 / Option 2
tony28
tony28
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 889
hello,
please can you help me or is not possible ?

thank you for response



How to post data/code on a forum to get the best help: Option 1 / Option 2
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search