Accomodating 'Dummy' Data?
Jul 23, 2005
Hello,
I am working with a vb6 Windows application that runs on Tablet PC's.
There are about five SQL Server 2000 databases that tie into the
application. SQL Server MSDE runs on the tablets, and currently there
is only one instance running. There are efforts underway to upgrade the
application to a .NET SmartClient.
One enhancement that needs to be made to the current application will
be to provide a 'training mode' in the application for the users. The
user will use the same application, but will work with 'dummy' data
instead of live data when in training mode.
So far as I can tell, the easiest way to accomodate this would be to
have a second instance of MSDE with 'copies' of all the databases
running, but with the 'dummy' data contained in the databases copies.
The application would have some mechanism for switching to 'training
mode', and maybe by some change of a connection string, the dummy data
would be presented in the application.
So aside from accomodating a 'training mode' feature in the
application, the application would remain the same, and the database
schema for the databases would remain the same. Only the data would
change for 'training mode'.
I'm looking for some ideas on how to approach this. This application is
used by five thousand field agents, and so we can't support this
implementation on a case by case basis. So my thought is that the
solution needs to have 'few moving parts'. If we can do this and get
away from having two instances of MSDE, that would be great. I have not
tried to set up identical databases in different directories on the
same instance (I figure that would cause a problem in a system table or
two someplace, but maybe not), but its one thing I want to investigate.
If you have any ideas on this, please share!
Thank you for your help!
CSDunn
View 1 Replies
ADVERTISEMENT
Aug 30, 2007
Years ago, I remember while doing maintenance on a stored procedure seeing a 'Select x, y, z Where 'some value' = 1.
The function of this, I believe was to make the select work but not retrieve any actual values.
I am attempting to use this in an 'Insert Into Select values From' statement. This insert uses multiple selects via unions and I need a final dummy Select statement with no Where criteria.
What I am thinking may not even apply to what I need to do here.
If you recognize something even remotely near what I am trying to get across I would appreciate your sending me the code.
Another solution for me is just inserting one row with a final RecId = 6 and ' ' or 0 values for the other fields into a table
but I was hoping this would work.
Example:
Insert Into table
Select
1 as RecId,
' ' as field1,
field2
From test1
Where field2 = 'CA'
Union
Select
2 as RecId,
' ' as field1,
field2
From test1
Where field2 = 'NJ'
Union
/*Final Select */
Select
6 as RecId,
' ' as field1,
field2
From test1
Where 'some value' = 1'
Thanks much for your assistance!!!
TADEG
View 1 Replies
View Related
Aug 27, 2006
No one answered this question, how do people normally insert dummy data into tables? I mean, where does the data typically come from? what process is used to insert the data? Note: This is for testing purposes, eventually to be tested in a Web-based front-end which I know nothing about.
thx,
Kat
View 8 Replies
View Related
Feb 24, 2008
Hello,
I have 4 tables: Folders, Files, Tags and FilesTags.
I need to insert some dummy data for testing as follows:
1. Insert 100 records in Tags tables.
Give Tag 01, Tag 02, Tag 03, ... to Tag names.
For this I have the following:
declare @i integer
select @i = 1
while @i <= 100
begin
insert into Tags ([text])
select 'Tag ' + right('000' + convert(varchar(3), @i), 3)
select @i = @i + 1
end
What I am missing is the following:
2. Insert 10 records in Folders tables.
Each folder should be filled as follows:
FolderID = New Guid
Name = "Name" + N (1, 2, 3, ...)
CreatedDate = Current Date
3. For each Folder I want to insert a random number of Files.
It can be added 0 to 10 Files.
Each file should be filled as follows:
FileID = New Guid
FolderID = Folder ID
Description = "Description" + Folder Number + File Number
4. For each file added associate it with a random number of Tags.
It can be 0 to 10 Tags and it should be done as follows:
Insert record in FilesTags where:
TagID = Random TagID taken from table Tags
That has still not be used in current File
FileID = Current FileID
Could someone, please, help me doing this?
My tables are as follows:
create table dbo.Tags
(
TagID uniqueidentifier not null
constraint PK_Tag primary key clustered,
[Name] nvarchar(200) not null
)
create table dbo.Folders
(
FolderID uniqueidentifier not null
constraint PK_Folder primary key clustered,
CreatedDate datetime not null,
[Name] nvarchar(200) null
)
create table dbo.Files
(
FileID uniqueidentifier not null
constraint PK_File primary key clustered,
FolderID uniqueidentifier not null,
Description nvarchar(2000) null,
constraint FK_Files_Folders
foreign key(FolderID)
references dbo.Folders(FolderID)
on delete cascade,
)
create table dbo.FilesTags
(
FileID uniqueidentifier not null,
TagID uniqueidentifier not null,
constraint PK_FilesTags
primary key clustered (FileID, TagID),
constraint FK_FilesTags_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesTags_Tags
foreign key(TagID)
references dbo.Tags(TagID)
)
Thank You,
Miguel
View 5 Replies
View Related
Nov 1, 1999
Hi.
Does anyone know if SQLServer 7.0 will generate dummy data for specific columns in tables?
TIA,
Jeff
View 2 Replies
View Related
Aug 24, 2006
In 2000, BCP seemed the way to go. DTS packages would also work. My question is, in 2005, what is the best choice? I seem to remember that BCP ignored all referential integrity constraints, and applying them afterwords was a royal pain. I'm not a BCP expert by any means. Running this at the command line means using the DOS prompt correct?
What is 2005's answer to this?
View 4 Replies
View Related
Jul 21, 2007
Thank you to the two persons who took time to respond to my question.
I have to tell you - I know absolutely NOTHING about SQL.
Can you please tell me in language a two-year-old could understand, "What is SQL?"
View 3 Replies
View Related
Mar 3, 2004
Hello,
For sure that this is a dummy question but can you explain me how SQL Server reacts to the fact that we have the same application running in two different pc's and this two applications intent to insert,update, delete or even read a record from the same table
Does "he" blocks the record until one of them leave the table ??? And if the other tries to update at the same time ???
Thanks,
Paulo
View 8 Replies
View Related
Feb 17, 2004
Hi!
I'm new in SQL SERVER 2000 and i'm looking for some kind of predefined dummy table. You know something like the "dual"-Table in Oracle. I want to use it for queries like that:
Select 1, 'auto' from dummy_table
Does anyone know, if something like that in SQL SERVER 2000 exists?
Nick
View 5 Replies
View Related
Jun 6, 2006
It seems every month when I'm diluged by lots of data I fall back on olereliable, Excel. But, I get over 50,000 rows of data to scrub. A colleagueof mine suggested I use a database. Seems simple so far, but having dabbledin Access, it has always not so intuitive to understand. My question istwo-fold, is SQL a database. I believe its the language of some otherdatabase. If I'm corrent on the later, what database(s) use SQL?Tony
View 1 Replies
View Related
Dec 6, 2005
Guys - scenario/DDL/DML below
Create table #Periods (Period INT , Frequency INT , startdate datetime NULL , enddate datetime NULL )
insert #Periods (Period , Frequency , startdate , enddate)
select 0 , 3 , '01-Nov-2004' , '30-Nov-2004'
union all
select 1 , 3 , '01-Dec-2004' , '31-Dec-2004'
union all
select 2 , 3 , '01-Jan-2005' , '31-Jan-2005'
union all
select 2 , 6 , '01-Nov-2004' , '30-Nov-2004'
union all
select 3 , 6 , '01-Dec-2004' , '31-Dec-2004'
union all
select 4 , 6 , '01-Jan-2005' , '31-Jan-2005'
select * from #periods
Period Frequency startdate enddate
03 2004-11-01 00:00:00.0002004-11-30 00:00:00.000
13 2004-12-01 00:00:00.0002004-12-31 00:00:00.000
23 2005-01-01 00:00:00.0002005-01-31 00:00:00.000
26 2004-11-01 00:00:00.0002004-11-30 00:00:00.000
36 2004-12-01 00:00:00.0002004-12-31 00:00:00.000
46 2005-01-01 00:00:00.0002005-01-31 00:00:00.000
For any frequency (in this simple example 6) where the 'lowest' period is not 0, I need to create dummy rows
so here I need to create the following
Period Frequency startdate enddate
06 NULL NULL
16 NULL NULL
I've built a temp table to identify the min period for each Frequency but am not sure where to go from here using this to do the inserts ?
select
min(Period) as MinPeriod ,
ResetFrequency
into #Periods2
from #Periods
group by ResetFrequency
select * from #CashFlow2
MinPeriodResetFrequency
03
16
View 3 Replies
View Related
Apr 19, 2004
Hi, Is there a dummy table in SQL Server just like DUAL in Oracle?
Thanks..
View 3 Replies
View Related
Jul 20, 2005
I've written code that dynamically builds an sql query based onvarious constraint possibilities.The problem is the code would have been very complex had I not come upwith a dummy constraint as a kind of place holder in the statement.To avoid complex logic that determines if there was another constraintbefore any other constraint and hence the need to add, say, AND ornot, I came up with a dummy constraint so that every subsequentconstraint will begin with AND. There's no need to determine whetherto add AND or not. This makes the coding much simpler because allthat needs to be done is ask if a certain condition exists then addthe constraint along with AND in front every time.So what I did was create the statement like this:SELECT elapsed_time AS ET from Table1 WHERE 1 > 0 AND 1stConstraintAND 2nd Constraint and so on.See if the 1 > 0 condition were not there it would be necessary tofirst determine the first actual contraint and not add AND in front ofit and then add the rest with ANDs in front of every one.I should add that the user does not have to select any constraint andthat's the problem. I need to stick that WHERE 1>0 in there so thatthere doesn't need to be a determination of which other, if any,constraints are selected.Even if my explanation above is not well understood, believe me thefront-end coding is much easier this way.My question is does the 1 > 0 conditional check present the databasewith any significant overhead or as far was dummy constraints go isthis as good as any other?-David
View 4 Replies
View Related
Dec 2, 2005
Hi AllCan you please help me with a few queries on adding a header line andpadding rows out.I apologise profusely for not providing the DDL for this, but I don't haveit. All I have is stored procedure that I'm trying to edit to make thefront-end app display the right data.The relevant part of the stored procedure that I'm working on is as follow:Declare StockHelpCursor Scroll Cursor ForSelect s.StockID,ISNULL(sd.ShortDescription, s.StockID) +space(30-len(ISNULL(sd.ShortDescription,s.StockID))) +pl.name +space(10-len(str(pl.name,10,3))) +sp.currencyid + str(sp.sellingprice,10,3) +space(10-len(str(sp.sellingprice,10,3))) +str(sq.quantityinstock)From Stock s, StockDescriptions sd, StockQuantities sq,StockPrices sp, PriceLevels plWhere (s.StockID Like @theID) And(ISNULL(sd.ShortDescription, sd.StockID) Like @theName) And(s.StockID=sd.StockID) And(s.StockID=sq.StockID) And(s.StockID=sp.StockID) And(sp.PriceLevelID=pl.PriceLevelID) And(sd.LanguageID=@theLanguageID) And(sp.CurrencyID=@theCurrencyID)Order By s.StockIDOpen StockHelpCursorPLEASE NOTE: this query works fine apart from the following problems:1) Creating a header line - I need to insert a header line to this cursorfor the field headers, as the app is stripping off this header. I wasthinking of creating a var, sticking it in-between the Declare and theSelect part and inserting these field headers, but I don't know how to dothis. Any ideas?2) Padding the results - As you can see from the script, I have tried to padout the above fields as the app's output window is basically a textbox, butthey just don't line up.NOTE: I'm using the 3 in the str(xxx,10,3) bit to make my numbers show at 3decimal places.Could you please give me some pointers on how I can pad these out correctly.ThanksRobbie
View 7 Replies
View Related
Jan 22, 2008
I have the following:
TicketID_1 AuditRec1
TicketID_1 AuditRec2
TicketID_1 AuditRec3
TicketID_1 AuditRec4
TicketID_1 AuditRec5
TicketID_2 AuditRec1
TicketID_2 AuditRec2
TicketID_2 AuditRec3
TicketID_2 AuditRec4
TicketID_2 AuditRec5
I need to insert a dummy row as the first row in this AuditRecord table for every occurrance of a given TicketID so that I get the following:
Dummy_Tick1 Dummy_AuditRec
TicketID_1 AuditRec1
TicketID_1 AuditRec2
TicketID_1 AuditRec3
TicketID_1 AuditRec4
TicketID_1 AuditRec5
Dummy_Tick2 Dummy_AuditRec
TicketID_2 AuditRec1
TicketID_2 AuditRec2
TicketID_2 AuditRec3
TicketID_2 AuditRec4
TicketID_2 AuditRec5
The AuditRec table is huge. How can I accomplish this using SQL?
View 1 Replies
View Related
Apr 23, 2008
I have matrix with 3 row groupings
Parent, Child, Baby
I have a value in the data cell and also a dummy column grouping to show some % values.
The % is basically what the row subtotal represents as a % of all the data in the dataset.
The Parent row group also has a subtotal, so the % here will show all values within the parent as a % of all data.
I have interactive sorting on Parent, Child and Baby.
but what I want to do is this:
Interactive sorting of the parent-subtotal-percent column values to cause a physical reordering of the parents.
i.e. show me the parents in order of their "% as a total of the entire dataset"
Possible?
View 5 Replies
View Related
Jul 17, 2015
I have the following attributes in this Table A.
1) Location_ID (int)
2) Serial_Number (nvarchar(Max))
3) KeyID (nvarchar(max)
4) Reference_Address (nvarchar(max)
5) SourceTime (datetime)
6) SourceValue (nvarchar)
I am trying to create 1000000 dummy records in this this table A.How do i go about do it? I would like my data to be something like this
LOCATION_ID
1
Serial Number
SN-01
KeyID
E1210
Reference_Address
83
SourceTime
2015-05-21 00:00:00 000
SourceValue
6200
View 7 Replies
View Related
May 19, 2015
I want to create a raw SQL resultset for outputting to Excel with some artificial headers transposed over the top of the 2nd part of the Union's column names. The first part of the Union will be the Headers. Like this, the space to the left of the topmost columns is preferably empty ....
COL 1    COL2     COL3      COL4 etc.                        BEH                            BIG       BPL etc.
*************************************Â Â INTAKTÂ Â Â Â Â Â DEFEKTÂ Â Â Â Â Â Â INTAKT DEFEKTÂ Â Â Â Â Â Â Â Â INTAKT
*************************************Â Â Â Â Â Â BÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â EÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â BÂ Â Â Â Â Â Â Â EÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â B
I just want the text above as a 3 line header and there won't be any values obviously. Then the 2nd query will be joined to the above with a Union all. The 2nd query has all the same column names as what will be given in the first set above. What is the SQL Syntax for doing so? Do I have to use a from clause?
View 4 Replies
View Related
Nov 24, 2006
Hi, all here,
Thank you very much for your kind attention.
I am wondering if it is possible to use SSIS to sample data set to training set and test set directly to my data mining models without saving them somewhere as occupying too much space? Really need guidance for that.
Thank you very much in advance for any help.
With best regards,
Yours sincerely,
View 5 Replies
View Related
Dec 14, 2005
After testing out the application i write on the local pc. I deploy it to the webserver to test it out. I get this error.
System.Data.SqlClient.SqlException: The conversion of a char data type to a
datetime data type resulted in an out-of-range datetime value.
Notes: all pages that have this error either has a repeater or datagrid which load data when page loading.
At first I thought the problem is with the date, but then I can see
that some other pages that has datagrid ( that has a date field) work
just fine.
anyone having this problem before?? hopefully you guys can help.
Thanks,
View 4 Replies
View Related
Dec 4, 2007
I have used both data readers and data adapters(with datasets) in the projects that I have worked on. I am trying to get some clarification on when I should be using which one. I think I am doing this correctly but I want to be sure I am developing good habits.
As the name might suggest, it seems like a datareader is for only reading data. I have read that the data adapter and dataset are for a disconnected architecture. Or, that they can be used for this type of set up. I have been using the data adapter and datasets when writing to a database and the datareader when reading from a database.
Is this how these should be used? Is the data reader the best choice for reading data? Am I doing this the optimal way from a performance stand point?
......................................................thanks in advance
View 1 Replies
View Related
Nov 2, 2015
We already integrated different client data to MDS with MS Excel plugin, now we want to push back updated or new added record to source database. is it possible do using MDS? Do we have any background sync process to which automatically sync data to and from subscriber and MDS?
View 4 Replies
View Related
Oct 18, 2006
When I enter over 4000 chars in any ntext field in my SQL Server 2005 database (directly in the database and through the application) I get an error saying that the data could not be updated because string or binary data would be truncated.Has anyone ever seen this? I cannot figure out what is causing it, ntext should be able to hold a lot more data that this...
View 7 Replies
View Related
Aug 12, 2015
I have a requirement to implement CDC for 50+ tables to implement incremental data changes warehouse/reporting rather than exporting the whole table data. The largest table is having more than half a billion records.
The warehouse use a daily copy of OLTP db (daily DB refresh). How can I accomplish this. Is there a downside in implementing CDC just for the sake of taking incremental changes on the tables?
Is there any performance impact if we enable CDC on OLTP db?
Can we make use of the CDC tables on the environment we do daily db refresh so that the queries don't hit OLTP database?
What is the best way to implement CDC to take incremental changes for reporting.
View 0 Replies
View Related
Jul 20, 2005
Hi,This is driving me nuts, I have a table that stores notes regarding anoperation in an IMAGE data type field in MS SQL Server 2000.I can read and write no problem using Access using the StrConv function andI can Update the field correctly in T-SQL using:DECLARE @ptrval varbinary(16)SELECT @ptrval = TEXTPTR(BITS_data)FROM mytable_BINARY WHERE ID = 'RB215'WRITETEXT OPERATION_BINARY.BITS @ptrval 'My notes for this operation'However, I just can not seem to be able to convert back to text theinformation once it is stored using T-SQL.My selects keep returning bin data.How to do this! Thanks for your help.SD
View 1 Replies
View Related
Nov 10, 2015
I'm using Script Component to load data into Oracle DB due to the poor performance issue. Now, I found it will missing some data during the transmission. Please see the screenshot below:Â
SQL Server:
Oracle:
DDL:
create table Person
(
BusinessEntityID Integer,
FirstName nvarchar2(50),
MiddleName nvarchar2(50),
LastName nvarchar2(50)
);
Result:
I follow up this article:Â [URL] ....
VB Script:Â
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
[Code] ..........
View 8 Replies
View Related
Apr 16, 2008
Hi all, i got this error:
[DTS.Pipeline] Error: "component "Excel Source" (1)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
and also this:
[Excel Source [1]] Warning: The external metadata column collection is out of synchronization with the data source columns. The column "Fiscal Week" needs to be updated in the external metadata column collection. The column "Fiscal Year" needs to be updated in the external metadata column collection. The column "1st level" needs to be added to the external metadata column collection. The column "2nd level" needs to be added to the external metadata column collection. The column "3rd level" needs to be added to the external metadata column collection. The "external metadata column "1st Level" (16745)" needs to be removed from the external metadata column collection. The "external metadata column "3rd Level" (16609)" needs to be removed from the external metadata column collection. The "external metadata column "2nd Level" (16272)" needs to be removed from the external metadata column collection.
I tried going data flow->excel connection->advanced editor for excel source-> input and output properties and tried to refresh the columns affected.
It seems that somehow the 3 columns are not read in from the source file?
ans alslo fiscal year, fiscal week is not set up up properly in my data destination?
anyone faced such errors before?
Thanks
View 13 Replies
View Related
Jul 24, 2015
When I execute the below stored procedure I get the error that "Arithmetic overflow error converting expression to data type int".
USE [FileSharing]
GO
/****** Object: StoredProcedure [dbo].[xlaAFSsp_reports] Script Date: 24.07.2015 17:04:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
[Code] .....
Msg 8115, Level 16, State 2, Procedure xlaAFSsp_reports, Line 25
Arithmetic overflow error converting expression to data type int.
The statement has been terminated.
(1 row(s) affected)
View 10 Replies
View Related
Feb 5, 2007
is there a step by step paper to get there? here is what i need to consider. I Iwill have many customers that will need their own set of records and access pages "branded for their company" each customer will have many clients. I am hosting this application on a windows 2003 server with SQL 2005 server enterprise.
I am using windows authentication, I have created a username in windows, then i added the windows user in SQL management studio in security, granted "DB Read" and "DB write" and again under the database security tab. still from the web authentication fails. i must be nissing a step or two?
I expect to set up a username for each database as i setup new customers.
View 1 Replies
View Related
Feb 23, 2008
RE: XML Data source .. Expression? Variable? Connection? Error: unable to read the XML data.
I want my XML Data source to be an expression as i will be looping through a directory of xml files.
I don't see the expression property or the connection property??
I tried setting the XMLData property to @[User::filename], but that results in:
Information: 0x40043006 at Load XML Files, DTS.Pipeline: Prepare for Execute phase is beginning.
Error: 0xC02090D0 at Load XML Files, XML Source [108]: The component "XML Source" (108) was unable to read the XML data.
Error: 0xC0047019 at Load XML Files, DTS.Pipeline: component "XML Source" (108) failed the prepare phase and returned error code 0xC02090D0.
Information: 0x4004300B at Load XML Files, DTS.Pipeline: "component "OLE DB Destination" (341)" wrote 0 rows.
Task failed: Load XML Files
Information: 0xC002F30E at Bad, File System Task: File or directory "d:jcpxmlLoadjcp2.xml.bad" was deleted.
Warning: 0x80019002 at Package: The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "Package.dtsx" finished: Failure.
The program '[3312] Package.dtsx: DTS' has exited with code 0 (0x0).
Thanks for any help or information.
View 3 Replies
View Related
Sep 28, 2015
I setup this package to import data from a Sharepoint list to a SQL Server data table. The primary key of my SQL table is mapped to the Title column of my Sharepoint list. There is a possibility that duplicate values will be entered in the Title field of the Sharepoint list. So when importing data into my table via SSIS, my package always error-out when there it comes across duplicate values. how you others have managed data integrity when importing from a Sharepoint list with the Title column being mapped to the primary key of a table.
View 4 Replies
View Related
Feb 12, 2008
Hello,
I am wondering what conversion rules apply, when a string, which contains a number, is saved to a SQL Server 2005 into a column of type decimal.
This is the code I€™m using (C++):
CString cValue = "0.75"
_variant_t vtFieldValue;
vtFieldValue = _variant_t(cValue)
pRecordSet->Fields->Item["MyColumn"]->Value = vtFieldValue;
"pRecordSet" is an ADO recordset. The database column "MyColumn" is of type "decimal(19,10)".
The most important question for me is, if the regional settings of the database server or the regional settings of the client PC are considered during the conversion from the string to the decimal value. For example in standard French regional settings the "." would not be recognized as decimal separator.
I am also wondering if the language of the database instance, in which this data is saved, is considered during this conversion or any other settings of this database instance.
So my general question is: Does anybody know exactly what rules apply during the above mentioned conversion?
Thank you for your help.
Regards,
Volker
View 2 Replies
View Related
Oct 12, 2015
I've question about how to handle structural datamodel changes in a datasource of PowerPivot. Suppose I'm developing a starmodel in SQL Server and sometimes a datatype changes or a name of a field changes in a table. It seems to me that PowerPivot handle this not gracefully as Analysis MD does (mostly). I received an error because of a wrong fieldname or even no error when a dattype changes in PowerPivot. Is this common or do I something wrong here. Does this mean that every time the datamodel changes the PowerPivot should be recreated? Or am I missing the clue here?
View 6 Replies
View Related