I have a Database which is Merge Replicated to 5 sitesI need to add 1 new fieldWhat is the best way of doing this ?I have previously removed the publications, subscribers, added thefield and pushed the whole database outPlease adviseRegards Paul
I'm doing a data conversion with one of my fields (SUMDWK) from one of the tables that will be used in a merge join. With the new, converted field, I do a look up. From this look up, I want to take a new field FiscalWeekOfYear, and replace the original field, SUMDWK. This is necessary because SUMDWK is one of the sorted fields. In the look up, it is not possible to change the Output Alias. Does anybody know a way around this? Thanks.
Hi! I'm a novice in asp .net I've a SqlDataSource component on an Aspx page.In the associated C# file, I would like to use datas from the query stored in the SqlDataSource component.How to do this? Thanxs :)
I am a student in a compagny because it´s my training. But, I must use MS SQL server and i don´t know at all this software ! I must import datas , which are in a ascii form, into MS SQL serveur 7,0.
Can you give me further information please, because it´s not easy at all ! thanks
i want to get some results but only for one month. like that;
select * from News where PubDate = month(9)
i tried use between dates but i got errors because all of months aren't 30 or 31 days ... For example February is 28 days sometime.. So how can i get a month results...
Hello, i am using sql server ce 2.0 for my device application.but this database sometimes gets corrupt,and i am not working with big size datas,if sdf file's size grow up,sdf file's performance gets knock out. for example: work with 50 mb data..what can i do?please somebody help me ?
Hi, All. For insert new entry...I used dataset and first all entry in dataset then i insert this dataset into datatabel of database. For update edit entry....First i bind tabel to dataset then i update,delete in dataset then i insert dataset to database then there are problem that is there are once again entry of dataset to that tabel. I also solved this problem by delete record which bind to dataset on save(insert )data set to database and then again insert dataset to tabel and solve it. But if any other option for it then plz replay me Thanks
I am having a problem to get all datas into one table I must get datas from 2 other tables datas from the first table are columns but datas of the second table are rows
I cannot change the structure of TableA because an other application is using it as it is
TableA num | value | key 1 | a | 1400 2 | b | 1401 3 | c | 1402 4 | d | 1403 ...|... | 1403
TableB key | name | descr | value 400 | john | ok | 451
TableC (the table where I want to insert datas from Table1 and Table2)
val1 | val2 | val3 | val4 |name | descr | value 1 | 2 | 3 |4 | john | ok | 451
TableA has thousands of rows and different numbers I must get 8 different datas from TableA
so I get an horrible Query !
SELECT
TableB.name, TableB.descr, TableB.value, TableA_1.value AS val1, TableA_2.value AS val2, TableA_3.value AS val3, TableA_4.value AS val4, TableA_5.value AS val5, TableA_6.value AS val6, TableA_7.value AS val7, TableA_8.value AS val8
FROM dbo.TableB INNER JOIN dbo.TableA_1 ON TableB.key = TableA_1.key INNER JOIN dbo.TableA_2 ON TableB.key = TableA_2.key INNER JOIN dbo.TableA_3 ON TableB.key = TableA_3.key INNER JOIN dbo.TableA_4 ON TableB.key = TableA_4.key INNER JOIN dbo.TableA_5 ON TableB.key = TableA_5.key INNER JOIN dbo.TableA_6 ON TableB.key = TableA_6.key INNER JOIN dbo.TableA_7 ON TableB.key = TableA_7.key INNER JOIN dbo.TableA_8 ON TableB.key = TableA_8.key
WHERE TableA_1.num = 145 AND TableA_2.num = 80 AND TableA_3.num = 3160 AND TableA_4.num = 41 AND TableA_5.num = 50 AND TableA_6.num = 51 AND TableA_7.num = 53 AND TableA_8.num = 56
Hi guys,I have a problem with my query. What i want to happen is to populate my table EV_NOTIFICATIONDETAILS (Docownerid, CurrentSentDate, LastSentDate, detailsID, GeneralRemarks) using the datas from the two different tables EV_NOTIFICATIONHEADER and EV_DOCDETAILS.I tried to create some a query but im having a error. The problem is once i insert the data from datas to the columns Docownerid, CurrentSentDate, LastSentDate the datas are stored in the database and when i tried to insert the remaining columns TO EV_NOTIFICATIONDETAILS detailsID, GeneralRemarks getting the datas from EV_DOCDETAIL it creates a new set of records in the database. Meaning it doesn't update the records in the table EV_NOTIFICATIONDETAILS but it creates a new set of records.here's my code:INSERT INTO EV_NOTIFICATIONDETAILS (Docownerid, CurrentNoticeSentDate, LastNoticeSentDate) SELECTDocownerid, CurrentSentDate, LastSentDateFROMEV_NOTIFICATIONHEADERINSERT INTO EV_NOTIFICATIONDETAILS (detailsID,GeneralRemarks) SELECTdetailsID,GeneralRemarksFROMEV_DOCDETAIL Any ideas and suggestions will be greatly appreciated.
I have a report in reporting services which has use many datasets. Those datasets retrieve data from a same table.
Each Dataset use a store procedure.
In the first store procedure (associated to the first dataset), i call an another store procedure which fill the table.
My problem is that datasets haven't datas retrieved in the order of their position. So the third (for exemple) can begin retrieve data while the first store proc (called in the first dataset) is still running. I had logging start/finish time of each SP and it appears that Dataset are retrieved in an asynchronous way.
Does anyone face the same problème. Is there a solution to execute an store procedure before retrieving data ?
Hi I have to populate some datas from sql server database and display it directly in a CSV Format or CSV file. When i run the project it should provide me an option to whether open or save or cancel the file. when i click open it should be opened and be viewed in a excel sheet in CSV format and when i click save it should ask the destination folder and should be saved there in CSV format and when i click cancel it should be cancelled and the application should be closed. pls note that all these actions should happen in the same browser and should not be redirected to anyother page. Can anybody give me the detailed description and code in Asp.Net using C# .It's very Urgent. RegardsVijay.
I have database on SQL Server 2000 set up with a merge publication.This publication is configured with a number of dynamic filters toreduce the amount of data sent to each client. Each client has ananonymous pull subscription. The merge process can be triggered by thewindows sync manager and my application.To improve performance I have created some helper tables to hold themapping between user login and primary keys of selected entities.For the replicated data to be correct the contents of the helper tablesneeds to be up to date.I need to fire off a stored procedure on the publisher beforereplication starts to verify that this data is up to date. I can notsee any documented way of doing this however I have been experimentingwith some unorthodox systems.Firstly has anyone any ideas?I have been considering adding a trigger to some of the tables used bythe Microsoft replication code - yes I know this is very nasty.My problems arise because executing this stored procedure will causesome data to be updated. In updating data we could create a newgeneration in the database. I must therefore run my stored procedurebefore any the Microsoft code makes any generation checks / updates.Anyone done anything similar, Anyone have any better ideas?Any comments would be gratefully received.
I'm using merge replication to maintain a backup copy of my main (publisher)MSDE database. A push subscription periodically (1 per minute) updates the backup DB. It's intended that if the main db goes down then the backup (subscription) db can be configured as a publisher. This must all be performed via scripting. The initial configuration of the main publisher and subscription is controlled via scripting, which works fine. The problems occur when I try to configure the subsciber to become a publisher. A script is executed on the subscriber but fails at the point when it's configuring the publisher detail. The error is something like "unable to configure a publication for a database setup as an anonymous subscription". I'm guessing that there are subscritpion artifacts added to the database which need to be removed before it can be configured as a new publisher.
I'm using DTS to import data from an Access memo field into a SQL Server ntext field. DTS is only importing the first 255 characters of the memo field and truncating the rest.I'd appreciate any insights into what may be causing this problem, and what I can do about it.Thanks in advance for any help!
I need to pass in null/blank value in the date field or declare the field as string and convert date back to string.
I tried the 2nd option but I am having trouble converting the two digits of the recordset (rs_get_msp_info(2), 1, 2))) into a four digit yr. But it will only the yr in two digits. The mfg_start_date is delcared as a string variable
option 1 I will have to declare the mfg_start_date as date but I need to send in a blank value for this variable in the stored procedure. It won't accept a null or blank value.
I am trying to drag data from Informix to Sql Server. When I kick off the package using an OLE DB Source and a SQL Server Destination, I get DT_DBDATE to DT_DBTIMESTAMP errors on two fields from Informix which are date data ....no timestamp part
I tried a couple of things:
Created a view of the Informix table where I cast the date fields as datetime year to fraction(5), which failed.
Altered the view to convert the date fields to char(10) with the hopes that SQL Server would implicitly cast them as datetime but it failed.
Hi ,Have a Visual C++ app that use odbc to access sql server database.Doing a select to get value of binary field and bind a char to thatfield as follows , field in database in binary(16)char lpResourceID[32+1];rc = SQLBindCol(hstmt, 1, SQL_C_CHAR,&lpResourceID,RESOURCE_ID_LEN_PLUS_NULL , &nLen1);and this works fine , however trying to move codebase to UNICODE antested the followingWCHAR lpResourceID[32+1];rc = SQLBindCol(hstmt, 1, SQL_W_CHAR,&lpResourceID,RESOURCE_ID_LEN_PLUS_NULL , &nLen1);but only returns 1/2 the data .Any ideas , thoughts this would work fine , nit sure why loosing dataAll ideas welcome.JOhn
Hi,another problem I have is that have compounded fields in my sql table.Exampleproduct@customerI need a simple function to return "customer", so it should return the valueafter "@", unfortunate "@" will sometimes be character number 6, sometimescharacter number 7 etc.regardsJorgen
I have a very strange situation. I've increased the size of an NVARCHAR field from 8 to 9 in a database table. The format of the data that I enter will either be an 8 character field (123456-8) or a 9 character field (1234567-9). The '-' is critical.
It used to only accept the 8 character version, but after increasing the field size, if I try to insert the 9 character field version, it gets truncated after the '-', as though it's still only allowing 8 characters. But that only occurs when I include the '-' or other such characters like '#'. If I try to insert 1234567a9, it works. The following explains the outcomes:
Inserted Value -> Result in table
123456-8 -> 123456-8Â Â Â Â Â Â *Correct 1234567-9 -> 1234567-Â Â Â Â Â *Wrong 123456789 -> 123456789Â Â Â *Correct 1234567#9 -> 1234567#Â Â Â Â *Wrong 1234567a9 -> 1234567a9Â Â Â *Correct
Why is it that characters such as '-' and '#' are truncating the value, but only if the string is 9 chars long?
I'm currently using a direct t-sql insert statement in SQLExpress. The field is a simple NVARCHAR(9) field.
I need create a field to store tax rate. I need only 2 decimal points. I defined the field as decimal, precision=5 and scale=2. Does it mean that it can hold value from 0.00 to 999.99?
I'm importing an Access database to SQL Server 2000. The issue I ran into is pretty frustrating... All Memo fields that get copied over (as Text fields) appear to be fine and visible in SQL Server Enterprise Manager... except when I display them on the web via ASP - everything is blank (no content at all).
I didn't have that problem with Access, so I ruled out the possibility that there's something wrong with the original data.
Is this some sort of an encoding problem that arose during database import? I would appreciate any pointers.