|
Anyone has experience getting it to work? When I tried to configure an ODBC database source, there is a dropdown list that is supposed to have all existing (oracle) services defined on your machine. For me, this dropdown list contains unreadable characters. If I ignore this dropdown and type in my service name, it won't work either.
Does anyone have the same problem?
|
|
|
|
|
Hi fellow coders!
I'm in a desperate need for some help in the form of code to convert opc-data to ODBC-data, does anyone know how this has to be done.
My main problem is that I shall picksome specific parameters from the OPC stream and send that data to an ODBC source.
TIA
Kind regards
Carsten
|
|
|
|
|
Are you meaning Open Packaging Conventions with OPC?
If you are, I believe that the only way is to write custom logic that reads the data, extracts the needed info and sends relevant data to target using ODBC.
The need to optimize rises from a bad design
|
|
|
|
|
Hi im very new to Ms Sql and have to create a view hat does the following using the northwind database:
Create views (c_v_best_sell_.....) to determine the best selling product based on Order Details. Your result should include the product_id, product name (Products), supplier_id, supplier_company_name (Suppliers) and the total units sold.
I can get it to display the best sold products amount in total using:
select max(T.total) from
(select productID, sum(Quantity * UnitPrice) as total from "Order Details" group by productID) T
or
Create View as c_v_best_sell
Select Max(T.total) as MaxSales
From(Select ProductID, sum(Quantity * UnitPrice) as total
From "Order Details"
group by "Order Details".ProductID )t
Any ideas on how to add the other colums?
|
|
|
|
|
Hi,
I have an application where i am selecting some records and updating and giving it back to the database. Now while i am updating these records, if another user is accessing the same table and same records, i want to restrict him to these records. Eg.. If i have selected some records with sr no. 1,2,3,4,5 and currently in a process in updating these records in an application, then i dont want these records to be updated or used by some other user at the same time.
Is it possible??
Sandeep Kumbhar
|
|
|
|
|
can you add a new column in the table which flag if it is being accessed ? and if it is then deny any other request to it.
so before updating the data, it will check if the flag is up or down. if it's down, change it to up and modify the data, commit, then change the flag to down. if the flag is up, then do nothing or show a message
|
|
|
|
|
i read somewhere that you can control record locking using different isolation levels
|
|
|
|
|
By default, while the update is actually taking place nobody will have access to the record - that is known as a dirty read. I suspect what you actually are trying to describe is have user A and user A read the data, user A updates it and then user B updates it, losing user A's changes. This is a common scenario, frequently resolved by using either a timestamp column or a sequence number on the record which is checked before the update is done - if its changed then do not update.
Hope this helps
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|
How can I achieve this:
I'm creating an SSRS and I have a matrix on which the aggregate data depends on the parameter.
Eg: if parameter is A then the aggregate data is Sum(Fields!weight.value)
but if the parameter is B then the aggregate data should be Sum(Fields!volume.value)
and if the parameter is A and B (multiple value allowed), then the aggregate data is Sum(Fields!volume.value + Fields!weight.value)
I've tried to just simply put in iif(Parameters!myPar.value = "A", Sum(Fields!weight.value), Sum(fields!volume.value)) with no success.
Any help would be appreciated.
Thanks
modified on Thursday, September 25, 2008 3:06 AM
|
|
|
|
|
Hello,
I've a SQL Server error when I'm runnig a query. The query contains 24 Tables.
The error is written below:
---------------------------
SQL Server Enterprise Manager
---------------------------
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate space for object '(SYSTEM table id: -255639869)' in database 'TEMPDB' because the 'DEFAULT' filegroup is full.
---------------------------
OK Help
---------------------------
Any one can tell me the solution of this problem.
Thanks
Syed Shahid Hussain
|
|
|
|
|
maybe the disk that TempDB is on is full or maybe the TempDB database has fixed size and is full ?
|
|
|
|
|
Ok Thanks, Let me check.
Syed Shahid Hussain
|
|
|
|
|
i am working on Sql Server 2005 BI (Integration Services) can anyone help me how to set and get value of user defiend variables.I want to passed some variables like connection string,login,password and paramerters to Integration Task and i want to used that paramerter value in where clouse of my query......very welcome for quick reply...
Ghazanfar Ali
Software Engineer (MSTS,MCPD,MCITP)
|
|
|
|
|
Hi,
Please take a look at the following article:
ARTICLE2[^]
ARTICLE1[^]
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Hi,
Apologies if this is the wrong location for this post.
I have a set of tables say Table A, B & C for simplicity. Table A relates to table B. Table B relates to Table C. No problems so far, however Table A also has related records in Table C. Those records in Table C are marked by not having a value for the the Table B key field.
Now in SQL we can write procedures that handle that but how can we get a .Net DataSet to have a defined relationship when one element is 'the column contains null'?
Obviously we can define another table (D) which just reads in the appropriate records so Table A then joins to Table D but that feels like overkill given that the rest of the table structure is the same.
Regards
Ian Cox
|
|
|
|
|
Perhaps I missed the point but you can define two separate relations using DataRelation class:
- one for table C -> table B
- one for table C -> table A
By default child column can have NULL value unless you define it NOT NULL.
Mika
The need to optimize rises from a bad design
|
|
|
|
|
May be I did not get the picture drawn clearly. Using your notation
Table A -> Table B -> Table C
Table A -> Table C
So
Using KeyA, KeyB and KeyC as field names
TableA
KeyA
TableB
KeyA
KeyB
TableC
KeyA
KeyB // Null for records related directly to TableA
KeyC
The first relationship to Table C is therefore possible using KeyA and KeyB from table B
The second is KeyA and null.
Are you saying that I can define the following relationship
ds.Relations.Add("Table A to B",
tableA.Columns["KeyA"], tableB.Columns["KeyA"]);
ds.Relations.Add("Table B to C",
new DataColumn[] {tableB.Columns["KeyA"], tableB.Columns["KeyB"]},
new DataColumn[] {tableC.Columns["KeyA"], tableC.Columns["KeyB"]);
ds.Relations.Add("Table A to C",
new DataColumn[] {tableA.Columns["KeyA"], null},
new DataColumn[] {tableC.Columns["KeyA"], tableC.Columns["KeyB"]);
Hope this better defines my issue.
|
|
|
|
|
Okay, I jumped into conclusions and didn't think that you would have primary keys that are combined from several fields (if each table would have only one primary key column this wouldn't be any problem).
Anyhow, it could work, but I think that the last relation should be (may have typos):
ds.Relations.Add("Table A to C",
new DataColumn[] {tableA.Columns["KeyA"], new DataColumn("AlwaysNull", relevantDataType, "NULL")},
new DataColumn[] {tableC.Columns["KeyA"], tableC.Columns["KeyB"]);
The idea is to create a calculated column which always has a vale of null. Haven't tested this though...
Mika
The need to optimize rises from a bad design
|
|
|
|
|
I see your logic. Did not think about calculated columns at all. I will try that out later, just looking at something else.
Many thanks
Ian Cox
|
|
|
|
|
You're welcome.
Mika
The need to optimize rises from a bad design
|
|
|
|
|
Listen,
i see you have a column that accepts nulls and is a foregn key?
if so try to use something like this:
SELECT id_client,first_name,isnull(middle_name,'noname'),
last_name FROM dbo.clients
As you see in this case middle_name is varchar like 'noname'.
But sometimes that doesn´t happen
SELECT cl.id_client,cl.first_name,cl.last_name,
isnull(ct.city_postalcode,'nocode')
FROM dbo.clients as cl inner join dbo.cities as ct
on ct.id_city = cl.id_city
Here isnull() doesn´t work,(int VS varchar) and you will not get the rows with null values in!!!
What i advice you to do to create a temp table (or not temp), fill the table and display the result, after that delete the table. You code will be larger.
It works fine
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
HI,
I want to install SQL server 2000 in my system.But always iam getting one message it showing
Another instance fo setup is already running
And iam not be able trace what is the reason.
And i want to remove all previous installation entries from Registry.
Through Add/Remove programs i deleted SQL SERVER. From registry how can i delete sql entries.
Thanks in advance.
Rayalu
|
|
|
|
|
This could be any setup (not necessarily SQL Server). Check processes from Task Manager to see if there's some setup running.
The need to optimize rises from a bad design
|
|
|
|
|
I am a beginner in designing database. I tried to create 2 tables Users and Topics for a tiny demo forum. The tables are like this:
[tbl_Users]
username
password
email
...
[tbl_Topics]
topicID
title
content
...
1 user can post 0..M topics, 1 topic belongs to only 1 user.
1 user can view 0..M topics (including other's topics). 1 topic can be viewed by 1..M users
I have some questions:
1. Do I have to create a small table name [tbl_User_Topic] between those 2 tables?
2. Do I need to create a UserID field for [tbl_Users] and use this as a primary key instead of username field
3. Should topicID field be auto increament number or just an integer number?
4. If topicID is not an auto number, then what mechanism should I use to create topicID?
Thanks for helping,
|
|
|
|