|
i think you can view code of the dataset and search for tag name <tables> and you find inside it all tables data from database
|
|
|
|
|
CREATE PROCEDURE MyProc AS
BEGIN
Select 'FirstTableName' AS TableName, Column1, Column2
FROM FirstTable
Select 'SecondTableName' AS TableName, Column1, Column2
FROM SecondTable
Select 'ThirdTableName' AS TableName, *
FROM ThirdTable
END
In the returning DataSet first column for all DataTables will have the TableName you have specified in the SP. You can identify the specific table using these names and assign an appropriate name to your DataTables.
|
|
|
|
|
Good idea, but unfortunatelly doesn't work. It seems like the name of the table (select) never comes from Stored Procedure to the DataSet.Table. This is very sad, because any time the stored procedure is changed, the code has to be recompiled. So what I did, is an additional SELECT with the names of the tables in the order it goes in the SP. This way I know how many tables I get and the names and the order
|
|
|
|
|
Hi,
I have two tables, I need records of first table that is not in the result of innerJion of these two tables.
How could I obtain that?
Best wishes
|
|
|
|
|
are you try left join?
or something like that
select * from table1 where id not in (select table1.id from table1 inner join table2 on table1.id=table2.id)
|
|
|
|
|
Unfortunately I dont have a unique field in table1 niether table2.(as id)
I know it's terrible, but it's not my fault.
Best wishes
|
|
|
|
|
mehrdadc48 wrote: Unfortunately I dont have a unique field in table1 niether table2.(as id)
than how you applied Inner Join between these two tables?
|
|
|
|
|
without unique field that may identify the values, the inner join will produce cross product...
|
|
|
|
|
Actually, these two tables have same fields.
One is filled with old data, another has new data.
I made join on all of the fields, because they are same.
Best wishes
|
|
|
|
|
Hi All,,,
I want To Get the Constraint Of a veiw in sql server 2005
Please give me this query??
thanks
|
|
|
|
|
Please Please Before you Post you must First Understand what you want
Try again and tell us exactly what you want
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Hi All,,
I Want To Get All Foreign Key From A Table And the Referenced Table Of This Foreign Key,,
How I Can DO That???
Thanks All;;;;
|
|
|
|
|
Look up INFORMATION_SCHEMA.TABLE_CONSTRAINTS in BOL.
Someone's gotta be the last to know, but why is it always me?
|
|
|
|
|
SELECT K_Table = FK.TABLE_NAME,FK_Column = CU.COLUMN_NAME,PK_Table = PK.TABLE_NAME,
PK_Column = PT.COLUMN_NAME,Constraint_Name = C.CONSTRAINT_NAME
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS C
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS FK ON C.CONSTRAINT_NAME = FK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS PK ON C.UNIQUE_CONSTRAINT_NAME = PK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE CU ON C.CONSTRAINT_NAME = CU.CONSTRAINT_NAME
INNER JOIN (
SELECT i1.TABLE_NAME, i2.COLUMN_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS i1
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE i2 ON i1.CONSTRAINT_NAME = i2.CONSTRAINT_NAME
WHERE i1.CONSTRAINT_TYPE = 'PRIMARY KEY'
) PT ON PT.TABLE_NAME = PK.TABLE_NAME
ORDER BY
1,2,3,4
|
|
|
|
|
Hi i am getting following error in error log files of iis.can anybody tell me about this.
The client was unable to reuse a session with SPID 628, which had been reset for connection pooling. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.
|
|
|
|
|
Hi,
Is it possible to have the following in sql?
IF @VarParam > 0 Exec(SELECT * FROM #TEMP1)
ELSE
Exec
(SELECT * FROM #TEMP1
UNION
SELECT * FROM #TEMP2)
Thank you
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
Hmmm... dunno, try:
EXEC (SELECT * FROM #TEMP1
UNION
SELECT * FROM #TEMP2 WHERE @VarParam > 0)
|
|
|
|
|
how to set sqlserver 2000 for accept remote connections ?
H.R
|
|
|
|
|
|
I saw many articles but i could not do that.
can any one help me with details ?
my application: VS.NET 2008 - C#
my DB: SQL Server 2000 personal edition
my windows: xp profesional sp3
H.R
|
|
|
|
|
Hi All,
Actually i have a problem in vista regarding a windows API SHOWWINDOW.
MY application is running in hide mode.I m Showing Window by using Findwindow() function.it runs successfully but sometimes in vista it runs successfully and software blinked in Taskbar. and it goes in background.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
If this is a database problem, I'm afraid I can't help you.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Dear All,
Is it possible to do one way replication using merge replication in MSSQL 2005?
if yes, plz provide me a reference.
thanks
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
i have solved the problem!
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
i am working on SQL2005.. i have installed Microsoft performance dashboard tool.
which let me know about cpu utilization graph on every second.
from last two days it showing me CPU utilization to 40%-50% and 10%-20% at some moment of time. but when it shows 40%-50% , there is no query in cache. on the other hand when it is on 10%-20% , there are so many queries in cache memory . and server computing power is fine in this case.
kindly tell me what is the reason behind this.?? and kindly let me know also how to make more and more queries to share the cache..
thanks in advance.
|
|
|
|