Exporting Data With Dynamic Fields

Jan 12, 2005

Hi,

I have one Query Builder application where user creates queries and generates output with required fields.Then user can export the same to excel (Using farPointSpread properties)
But if no. of records goes beyond 10K it goes too slow or even user machine hangs up. I want to give proper export facility. Can it be given using DTS?

I tried DTS (.vbs) file. but for random field selection it did not work.

View 2 Replies


ADVERTISEMENT

SQL Statement For Querying Data With Dynamic Fields

Sep 19, 2006

I am working on a project in which a customer wants to be able to list and search their inventory and display the items in a table/grid on a web page.Each item in their inventory has a set of properties - for example, manufacturer, price, serial number, name, etc.  The complicated part is that they want an admin to be able to modify/add/delete the set of properties.  So for example, they could add the attribute "size."   Given that, I think what is needed is 3 tables - one to store the set of properties schema, one for the items, and one to store the actual properties for each item.  I know i COULD use alter table statements to add and delete columns, but that doesn't seem like the "right" solution.I would like to be able to write a query such that each row returns the item and all its properties - then i can easily bind to a datagrid.  However, what would the query be to do this?  I also need to be able to allow the customer to query for items with certain properties - i imagine the sql for that to be similar to this:SELECT * FROM items d WHERE d.Id IN(SELECT a.ItemId FROM attributes a WHERE a.Name = "Manufacturer" AND a.Value = "Samsung") AND d.Id IN(SELECT a.ItemId FROM attributes a WHERE a.Name = "SerialNumber" AND a.Value = "3223")

View 1 Replies View Related

Dynamic Data Set Based On Calculated Fields

Mar 26, 2008



Hi,

I have three data sets. Data Set A is bound to my table in my report. There are also Data Sets B and C. All three data sets have the identical columns. I have setup data set A so that all of its fields are "Calculated". The calculation for each field will either pick the field from data set B or data set C based upon a parameter called BorC. So the calcualted fields in data set A look like the following:


=iif(Parameters!BorC.Value, First(Fields!MyField.Value, "dataset_B"), First(Fields!MyField.Value, "dataset_C"))

Problem is when I run the report I get internal error. Is it possible to populate one data set from the fields of another data set? If so is there some trick to doing this? Stripping this example down to one column in each of the data sets, and then just directly setting data set A from either B or C still gives me the same error. SO I set the one field in data set A to the following and it still doesn't work:

=First(Fields!MyField.Value, "dataset_B")

OR

=First(Fields!MyField.Value, "dataset_C")

This leads me to believe there is some fundamental problem with using another data set in a Calculated field. Since I think I have done this before I am convinced I am doing sommething wrong.

Any advice you have for me would be greatly appreciated!

Thanks.

View 1 Replies View Related

Control Names Of Fields When Exporting To CSV

Dec 19, 2006

My query returns fields that have spaces in the names, for example:

select o.OrderID as 'INVOICE NUMBER', etc..

When I created the DataSet for this query in report designer, it changed all spaces in the field names to underscores, i.e. INVOICE_NUMBER.

This report must be exported to CSV, and the names of the fields (first row in csv) must have the spaces, not underscores. But it appears RS uses the field names (not the names in the column headers of the report table control) as the field names. Is there any way for me to force the field names in the first row of the csv to something other than the field names in the DataSet?

Thanks!

View 5 Replies View Related

Dynamic Fields In SQL

Dec 31, 2003

I want to make my table have dynamic fields. For example if my table includes 2 fields. ID & name. I want the user to be able to add another field (if he needs) with the datatype he determines and the field name. I want then to alter the table and add that field.ok
using alter statement is not required cause it mat cause lose of data if error occurs in the middle of the trnsaction.
any suggessions???
Thnak :)

View 2 Replies View Related

Dynamic Table Name And Fields

Jan 13, 2007

I need to get the field values of a table (name will be dynamic).Then assign those values to properties in a class.Let's say I will get the table name dynamically.dim tblName as string = "tablea"The 2 tables can each have 25 fields or so.I need a way to select the amt and email field values from tblName.  Without saying "select job_amt, job_email from ...Is there someway to get the values based on the column name.  So if the column name has amt and email, then give me those values.Maybe loop through the datatable - then for each column -- if col.ColumnName.IndexOf("Amt") = 0 or col.ColumnName.IndexOf("email") = 0 thenthen drop  that column from the datatable.ex of table structure<u>tablea</u>job_idjob_amtjob_email<u>tableb</u>dance_idamt_dancedance_email

View 3 Replies View Related

Subreports: Parameter Value Dropdown Shows Sum And Count Fields But Not The Actual Data Fields.

Jan 28, 2008


I have just started using SQL Server reporting services and am stuck with creating subreports.

I have a added a sub report to the main report. When I right click on the sub report, go to properties -> Parameters, and click on the dropdown for Parameter Value, I see all Sum and Count fields but not the data fields.

For example, In the dropdownlist for the Parameter value, I see Sum(Fields!TASK_ID.Value, "AppTest"), Count(Fields!TASK_NAME.Value, "CammpTest") but not Fields!TASK_NAME.Value, Fields!TASK_ID.Value which are the fields retrieved from the dataset assigned to the subreport.

When I manually change the parameter value to Fields!TASK_ID.Value, and try to preview the report, I get Error: Subreport could not be shown. I have no idea what the underlying issue is but am guessing that it's because the field - Fields!TASK_ID.Value is not in the dropdown but am trying to link the main report and sub report with this field.

Am I missing something here? Any help is appreciated.

Thanks,
Sirisha

View 3 Replies View Related

Dynamic Filedlength Of Varchar Fields In Source

Nov 21, 2006

I'm using SSIS to import data from a table (SQL) containing varchar fields. The problem is, that those varchar fields are changing over time (sometimes shrinking and sometimes expanding). I.e. from varchar(16) to varchar(20).

When I create my SSIS package, the package seem to store information about the length of each source-field. At runtime, if the field-length is larger then what the package expects an error is thown.

Is there anyway around this problem?

Oh, yeah... My destination fields are a lot wider then the source fields, so the problem is not that the varchar values doesn't fit in my destination table, but that the package expects the source to be smaller...

Regards Andreas

View 3 Replies View Related

Reporting Services :: Dynamic Fields In SSRS

May 21, 2015

I have a SP like this:

ALTER PROCEDURE [dbo].[ReportGateWay]
(
@ISO bigint= 0,
@Gateway bigint= 0
)
AS
BEGIN
DECLARE @SQL nvarchar(max)

[Code] ....

I need to invoke this in SSRS. The problem is that when on creating dataset for this, I get an error which read:

You must have atleast one field for your dataset

What can be done in this case?

Here is the SQL Fiddle: [URL] ....

View 16 Replies View Related

Update Fields With Data From Other Fields In Same Row

Jun 30, 2000

Pardon me if this question is too elementary. I am trying to create a trigger that will cause certain datafields to be updated with values from other data fields in the same row when a certain column, created specifically to fire the trigger, is updated. The purpose of this is to reduce data entry by field personnel.I think I have the create trigger statement correct, but I'm a little confused on the update statement.

In a nutshell, how can I write something like:
UPDATE "TABLENAME"
SET DATAFIELD1 = DATAFIELD2
WHERE RECORDNUMBER = (THE SAME RECORD NUMBER)

I do know that I have to ensure that sp_dboption Recursive Triggers value is set to false, thanks.

View 2 Replies View Related

Export Wizard Disturb The Order Of Data While Exporting Data To Acess 2003 From SQL Server 2005

Feb 24, 2007

 
I am using the following query to export data from sql server to ms access in export data wizard:
 
SELECT * FROM myView where myID = 123
Order by varcharColumnName1,varcharColumnName2 ,intColumnName3
 
This query will fetch about 7, 00,000 records.
 
SQL server 2005 shows the correct order, but Data in access table shows Incorrect data.
 
Please give me the solutions.

View 4 Replies View Related

Exporting Data - Unable To Append All Data To The Table

Jun 28, 2012

I have a sql server 2008 backend with an Access 2007 frontend database. Each time I export a query I get the following error:

Code:
Microsoft Access was unable to append all the data to the table.

The contents of fields in 0 record(s) were deleted, and 1 record(s) were lost due to key violations.

*If data was deleted, the data you pasted or imported doesn't match the field data types or the FieldSize property in the destination table.
*If records were lost, either the records you pasted contain primary key values that already exist in the destination table, or they violate referential integrity rules for a relationship defined between tables. Do you want to proceed anyway?

I don't know what if anything is actually missing because of the amount of data is more thant 6000 records. It seems everything exported but I would have to comb through the data to be sure.

View 3 Replies View Related

Exporting Data From A Merge Join From One Data Flow To Another

Mar 1, 2006

Hi,

Does anyone know if it is possible to point data that underwent the "merge join" transformation (in one data flow) to the following data flow? I don't want to recreate all that merging, sorting and calling the same sources again in the following data flow if the data that I am using exists in the previous data flow. The merged data is simply too big to export to an excel file, so does anyone have any ideas? Thanks!

View 8 Replies View Related

EXPORTING DATA

Mar 21, 2001

hi all,
I am getting problem while importing data from excel file.
I am bale to do the same with flat files. But when i do with excel files
its throwing error : format error.
pls help me in this regard.
and How to export data into export files from query analyser..

View 2 Replies View Related

Exporting Data

Feb 1, 2005

Hello everybody,

I was wondering if there is a way to export and recode data at the same time with SQL.

For example I have gender information coded as 1 or 2 in my table and I need to upload the information to a different application that needs M or F. Is there a way to export to a new table and recode at the same time ?

I'm still pretty new to it.

Thank you.

-Seb

View 5 Replies View Related

Exporting Data

Apr 20, 2004

I would like to export data to a excel file using a stored procedure. I'm not sure how to go about this or if it is even possible. Can someone point me to a link to show me how to do this?

View 1 Replies View Related

Exporting Data

Jan 17, 2007

Hi all,

I recently found out that there is no easy way to distribute a MSSQL 2005 database to MSSQL Server 2000. Most forums that I have read say to use the DTS facility to import the data into the SQL 2000, however this is not an option (for a variety of reason I won't go into).

The next best option in my mind is to script the entire database, including the data into one or a few script files then run them on the SQL 2000 server to recreate the database. Unfortunately, exporting the data, what I thought would be a fundamental feature, isn't part of SQL 2005.

So does anybody know of a good (free) scripting program that will allow me to export the entire database from a server? I've tried:
- Free program from the CodeProject.com (program dies when there's more than 5000 lines) http://www.codeproject.com/dotnet/ScriptDatabase.asp
-SQL Scripter www.sqlscripter.com (Doesn't script table which don't have primary keys, and produces a script for each object instead of just a single file)

I'd probably like a program which only creates a single script, as the database has over 200 tables and I don't want to have to go through this process everytime I need to distribute the DB (which will be often).

The only other option I can think of is a program which converts an SQL 2005 backup to a 2000 version.

Thanks for your help!

View 1 Replies View Related

Exporting Data

Jul 5, 2007

Guys,

I'm trying to export data from SQL. Can anyone help. I have commented my script below and have managed to create a table, insert using 'bulk insert' - now I want to export the data out. I'm getting an error message saying 'cannot use the output option when passing to a stored procedure'.

comment
-----------
drop table for re-runs !
-----------

drop table JET
go

comment
------------
create a table to match the .txt file importing
----------

create table JET
( [USER] char( 25),
[DESC] char (20),
SYSDATE datetime,
SYSVALUE MONEY ,
POSTDATE datetime,
POSTVALUE MONEY,
GLCODE CHAR (20)
)

comment
---------------
import using pipe delimited .txt file
--------------

bulk insert JET from 'D:Documents and SettingsmpeetSQL Test.txt'
with
(
fieldterminator = '|',
firstrow = 2
)

comment
-------
check results
-------

select *
from JET


NEW BATCH

bcp JET out 'D:Documents and SettingsmpeetSQL Testexport.txt'

I want extract the data to a .txt file would anyone know the syntax?

Cheers

Michael

View 3 Replies View Related

Exporting Data

Sep 12, 2007

I am using sql server 2005

I want export data from Excel to new SQL Server table,

select *
into mytable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=c:sample1.xls;HDR=YES',
'SELECT * FROM [Sheet1$]')

But i am getting following error message

OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "The Microsoft Jet database engine could not find the object 'Sheet1$'. Make sure the object exists and that you spell its name and the path name correctly.".
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".

View 2 Replies View Related

Exporting Data From SQL

Jan 17, 2008

I'm very new to SQL - please bear with me.

1. I need to be able to export data from a database to an excel sheet (I have written the query and tested it works, so I don't need to know this stage :^)). What is the best way of doing this? Could you send me a link of a howto doc?

2. Once the data is export to excel, it then needs to be manipulated so that a final sheet is created. During the manipulation I need to add the values of certain columns to give me an end result.

Should I use excel to manipulate the data or can sql add the values of certain columns and then export to an excel sheet?

What's the best way please.

Many thanks

View 5 Replies View Related

Exporting Complex Data To CSV

May 12, 2007

I want to export data to CSV that is nested.
eg.Poll 1,val1,val2
Question1,Q1val1,Q1val2
AnswerQ1A1,Q1A1val1,Q1A1val2, TallyQ1A1
AnswerQ1A2,Q1A2val1,Q1A2val2, TallyQ1A2
Question2,Q2val1,Q2val2
AnswerQ2A1,Q2A1val1,Q2A1val2, TallyQ2A1
AnswerQ2A2,Q2A2val1,Q2A2val2, TallyQ2A2
AnswerQ2A3,Q2A3val1,Q2A3val2, TallyQ2A3
 
Best practices-wise, what should my data end up like?
Since it's nested surely it can't be simply a list of identically-formatted rows, one for each answer:
Poll1,val1,val2,Question1,Q1val1,Q1val2, AnswerQ1A1,Q1A1val1,Q1A1val2, TallyQ1A1,Poll1,val1,val2,Question1,Q1val1,Q1val2, AnswerQ1A2,Q1A2val1,Q1A2val2, TallyQ1A2,Poll1,val1,val2,Question2,Q2val1,Q2val2, AnswerQ2A1,Q2A1val1,Q2A1val2, TallyQ2A1,Poll1,val1,val2,Question2,Q2val1,Q2val2, AnswerQ2A2,Q2A2val1,Q2A2val2, TallyQ2A2
Do I end up with three separate tables?
Poll1,val1,val2
Question1,Q1val1,Q1val2, Question2,Q2val1,Q2val2
AnswerQ1A1,Q1A1val1,Q1A1val2, TallyQ1A1,AnswerQ1A2,Q1A2val1,Q1A2val2, TallyQ1A2,AnswerQ2A1,Q2A1val1,Q2A1val2, TallyQ2A1,AnswerQ2A2,Q2A2val1,Q2A2val2, TallyQ2A2
If that's so, do I simply concatenate them in the final file? Or do I have three separate files? And do I label them uniquely such as Poll1Main, Poll1Questions and Poll1Answers so that I can export several polls side-by-side without overwriting each other?
 

View 1 Replies View Related

Exporting Data Into .CSV Format

Jan 17, 2008

Hi
I am trying to export data from SQL which is ok and I can do that part.  However from the result of the query I need to add the values of certain columns.  Because I'm a newbie to SQL I'll explain and try and show images as best as I can as we go....
So far I have written a query
select Stockitem.code, Warehouseitem.ConfirmedQtyInStock, Warehouseitem.UnConfirmedQtyInStock, Warehouseitem.QuantityAllocatedStock, Warehouseitem.QuantityAllocatedBOM, Warehouseitem.QuantityAllocatedSOP, WarehouseItem.WarehouseIDfrom WarehouseItem INNER JOIN StockItem ONWarehouseItem.ItemID = Stockitem.itemidINNER JOIN BinItem ONBinitem.itemid = stockitem.itemidwhere WarehouseItem.WarehouseID = '3403' AND BinItem.BinName LIKE 'S%' AND BinItem.BinName <> 'S' OR BinItem.BinName LIKE 'T%' AND BinItem.BinName <> 'T'order by stockitem.code
 This returns the following results....
 Code             ConfirmedQtyInStock      UnConfirmedQtyInStock      QuantityAllocatedStock        QuantityAllocatedBOM      QuantityAllocatedSOP       WarehouseID
12345             96.00000                        .00000                              .00000                                 3.00000                            13.00000                           3403
Now I am trying to find out the amount of freestock available for everything with the WarehouseID 3403.  Therefore in the example above to be able to workout how many '12345' (Code) we have in stock, the equation used to find out the free stock available is as follows....
 Free Stock = (ConfirmedQtyInStock + UnConfirmedQtyInStock) – (QuantityAllocatedStock+ QuantityAllocatedBOM + QuantityAllocatedSOP)
Therefore if I manually use the equation above the amount of freestock available =
 Free Stock = (96+0) - (0+3+13) = 80 (free stock).
Then once I have the equation to be able to output the 'freestock' quantity, I need to export the results into an excel spreadsheet with the following layout...
 ColumnA
Code,FreeStock
12345,80
Hope I've explained this in a good manner, any help would be gratefully received.
Simba

View 2 Replies View Related

Exporting Data, Urgent!!

Jul 24, 2001

Hi All,

I need to export data from one database to another and I want to automate this process. The problem is I only have to select specific tables of data to be exported. Any help will be greatly appreciated
Thank you!!

View 2 Replies View Related

Exporting Data From A Query To A Csv Or Xls Via T-sql

Jan 12, 2001

Is there any way in SQL 7/2000 to export a query result to a csv or xls via t-sql?

Thanks a lot for your help,

Yelena

View 2 Replies View Related

Importing && Exporting Data

Dec 21, 2004

may i know where to find more detail like how to importing and exporting data in ms sql server.?
Hope can get the more detail about it and also teach me step by step. (hope can include the photo).

View 4 Replies View Related

Exporting Data/1st Three Lines NOT CSV..

Oct 3, 2005

I have a specific format that I need to export data to. The first three lines of the document MUST be in the form of:

ascii
,
klg, Eastern Daylight Time,1,1
PineGrove,0,2005/10/01,00:00,1,1.75,192
PineGrove,0,2005/10/01,00:05,1,1.75,192
Pinegrove,0,2005/10/01,00:10,1,1.75,192

If I set this up in DTS and do an export, it puts commas after ascii - which I cannot have.

I've also tried using two data sources and exporting twice (hoping to append), however, one just overwrites the other.

Anyone have any ideas?? :o

Thanks in advance,
Krista

View 6 Replies View Related

Exporting Data+Structure

Mar 4, 2004

Hello E'body,

I have to export a SQL Server Table (Structure+Data) to an access mdb file at run time. How can i do it? please help.

Lax.

View 1 Replies View Related

Exporting Data From MSDE

Nov 1, 2006

Does anybody know what "free" tool I can use to export data from an MSDE database? I want to import it back to SQL Server

View 5 Replies View Related

Exporting Data To Excel

Jul 15, 2007

Hi,

I am Sree Raj. New to SQL Server.

I am trying to export data to excel and it is giving an error.
Here is the query and error:

INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:SQL ServerEmp_Personal_Data.xls;', 'SELECT * FROM [Sheet1$]')
SELECT * FROM Emp_Info

error is:
Cannot get the column information from OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)"

Can anybody please help me what is this error about & how to fix this.

Thanks in advance
Sree Raj

View 1 Replies View Related

Exporting Data To Excel From A DTS

Jul 23, 2005

Hi all,I've seen this noted in many posts, but nothing I've checked out givesme any clue on how to do this.Basically as my topic says, I have a DTS and I simply need to exportsome data from a table in MS SQL 2000 to an Excel spreadsheet. I alsoneed to automate this process so it can run nightly and each new day anew spreadsheet will be on a network share for us to pick-up.Can someone point me to the right direction? This needs to be donetotally through the DTS script, so no ImportExport wizard or anythingmanual.Thanks --Sam

View 1 Replies View Related

Exporting Data And Keep The Primary Key

Jan 5, 2006

Hi all,

I am rather fresh to SQL2000, so...

When I export data from database A tot database B and I look at the copied tables in database B, all the primary keys are gone and the field is now a "normal" field ?

How can I keep the primary key in the copied tables ?

Help is appreciated, Ger.

 

View 4 Replies View Related

Exporting Data Into MS Access.

Mar 25, 2008



Hi,

Want to export the data from SQL2K5 into MS Access 2003.

Anyone, can guide me how to proceed with this.

Regards,

View 8 Replies View Related

Exporting Chart Data As XML

Oct 10, 2007

Hello,


I am new to using the Web Services interface of the SSRS 2005, and would like to know if there is a way to export the resulting data of a report as XML.
Note that the Reports I have are composed of Charts, mainly Dundas Charts. I would like to export the data behind the Chart as an XML string for example so I can work with it independantly.
Has anyone done something similar?
Any guideline is appreciated...


Thanks,
Grace

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved