Forum Widgets
Latest Discussions
Parameterize OLE DB Destination?
I have a large number of tables to backfill and I was hoping to automate this process with a package parameter instead of creating a dataflow for each table (see screenshot below). Package parameter like 'tbl_a, tbl_b, tbl_c' Followed by an Execute Script that splits this string into an Array. The array would then be enumated in a Foreach loop container. 3a. SQL command from enumerated variable would be fed into an OLE DB Source SQL Command 'Select * from tbl_a', 'Select * from tbl_b', etc. 3b. Table name or view name variable in OLE Destination would be given different table names 'tbl_a' , 'tbl_bl', tbl_c' through the enumerated variables Where it fails is when tbl_a, tbl_b is enumarated into OLE DB Destination Error: 0xC020201B at Data Flow Task, OLE DB Destination [2]: The number of input columns for OLE DB Destination.Inputs[OLE DB Destination Input] cannot be zero. Error: 0xC004706B at Data Flow Task, SSIS.Pipeline: "OLE DB Destination" failed validation and returned validation status "VS_ISBROKEN". Is there a way to parameterize OLE DB Destination? Is there a way to avoid need column mappings or somehow query all the columns from the OLE DB Source to feed into OLE DB Destination? Each table is different and mapping the columns for one backfill would completely blow up the next backfill in the batch. Is there another Task I can use in place of OLE DB Destination that can be preceded by OLE DB Source? Thanks in advancejharper305Mar 12, 2025Copper Contributor2Views0likes0CommentsTable
Hello everyone, I have a problem. Our products are dimension-dependent (width / height) and the prices are stored in a table [Costinformation]. The grid table is in the Pricetable column. Rows are separated with CRLF and the individual columns with Tab. Table [Costinformation] Mandant Code Text Category Pricetable 1 4711 Product Table 1 Window 1 4712 Product Table 2 Door Example Pricetable-Column W / H 100 200 300 400 100 10,00 20,00 30,00 40,00 200 20,00 30,00 40,00 50,00 300 30,00 40,00 50,00 60,00 400 40,00 50,00 60,00 70,00 Now it is so that there are always price adjustments. In 100% of cases, this is in percentage terms. This means that the prices in the grid table have to be extrapolated. I need a solution so that I no longer have to do this manually. Can it be done directly via an SQL statement? Example: Product Table 1 --> price + 5% Produkt Table 2 --> price + 3 % I hope it is understandable. My English is not so good. I can also provide an example table. Thank you very much for you help. Greetings from Germany CharlyStellaCharlyStellaMar 12, 2025Occasional Reader65Views0likes1CommentCurrent SQL Server Certifications
Hello, I had a couple Microsoft certifications many years ago and am interested in getting re-certified in SQL Server. I looked on learning.microsoft.com but couldn't find any certification options. Am I looking in the right place? Does Microsoft still offer SQL Server certifications? Thanks, BrettMango42Mar 11, 2025Copper Contributor342Views0likes3CommentsCreating LinkedServer between On-Prem SQL to Azure SQL MI
Hi, is it possible to use security option (Be made using the login's current security context )with lnikedserver from on-prem SQL to MI ? Our MI is enabled for windows auth and we are successfully connect MI in SSMS using windows auth from on-prem client. when I use this option in linkedserver and try to access linked server with windows auth I get following error. Login failed for user '<token-identified principal>'. Reason: Could not find a user matching the name providedsksingh123Mar 11, 2025Copper Contributor14Views0likes0CommentsHow to add existing log files to a newly created filegroup ?
I have two log files which are on different drives A: \logfile1.ldf & B:\logfile2.ldf which are not part of a file group. I want to remove logfile2.ldf , but I am unable to remove it because it is not empty. I tried emptying it by shrinking , but because it is not part of the filegroup, it failed. When I tried to add the files to a newly created filegroup, using ALTER DATABASE ADD FILE( name= 'logfile1', filename='A:\logfile1.ldf') TO FILEGROUP LOGFILE I got an error message The logical file name "logfile1" is already in use. Choose a different name. So, how can I add the log files to filegroup 'LOGFILE'? Thank you.SolvedwsunarkoMar 11, 2025Copper Contributor49Views0likes3Comments- Bayas1200Mar 11, 2025Copper Contributor259Views0likes2Comments
Two missing record from this query
I have the following query: SELECT '20'||SUBSTR(CAST(T1.LMDTM1 as VarCHar(15)), 2, 6) as Date, T1.LMFSTM as Status, T1.LMREF1 as CustPO, TRIM(T1.LMREF1) ||'-'||TRIM(T1.LMREF2) as Key, T1.LMREF2 as Order, T1.LMREF3 as GUID FROM EXTSYSFCC.EXLLMQLD T1 WHERE t1.LMDTM1 = ( SELECT MAX(t2.LMDTM1) FROM EXTSYSFCC.EXLLMQLD t2 WHERE t2.LMREF2 = t1.LMREF2 ) AND LMTPC1 = 'ABC' AND LMMSID = '123' For some unknown reason to me I detected at least two records that are not included, the date field is 20250217 and the part where it skips those two records, there is at least one record with the same date, is this: t1.LMDTM1 = ( SELECT MAX(t2.LMDTM1) FROM EXTSYSFCC.EXLLMQLD t2 WHERE t2.LMREF2 = t1.LMREF2 ) If I delete that part I can see those two records. Any help will be deeply appreciated. Thanks!martipe1Mar 07, 2025Copper Contributor26Views0likes2CommentsOutlining not working in SSMS 18.x and 19.x
Edit, This problem is also present in SSMS 20.1, Does Microsoft care at all, or are they not capable of fixing this? In SSMS 18.x and 19.x, the outlining feature that allows you to collapse SQL code often stops working, i.e. the +/- next to the code disappears and neither shortcuts or clicking in the menu will collapse code. I have tried to uncheck outline statements in the option under intellisense and then recheck it, but that makes no difference. Closing SSMS and restarting sometimes helps, but after a while I'm back to the same problem. I have never had this issue in SSMS 17.x Does anyone else have this problem, and how do you solve it?SolvedMartinxNMar 06, 2025Brass Contributor7.9KViews2likes23CommentsSearch a string like '%ontario%' in ALL the tables of database
Hi, I want to search '%Ontario%'. How i can search the specific string using like command in ALL the tables of the database from one single query. I want to know which table has like 'Ontario'. ThanksSolvedSmithTorontoMar 05, 2025Copper Contributor45Views0likes4CommentsHow do I unpivot so that the value column comes at the end?
hello all, I have learning the unpivot function, according to the documentation, the clause before the FOR keyword comes at the end. But when I do it, the column before the FOR keyboard comes before the column after the FOR keyboard. please see this example I did How can I make the value column to be the final column like the documentation? Thanks you.benjamin_2024Mar 04, 2025Copper Contributor27Views0likes1Comment
Resources
Tags
- Data Warehouse66 Topics
- Integration Services58 Topics
- sql server49 Topics
- Reporting Services43 Topics
- SQL43 Topics
- Business Intelligence35 Topics
- Analysis Services31 Topics
- Business Apps22 Topics
- analytics21 Topics
- ssms13 Topics