|
According to the syntax mentioned in this[^] blogpost, I'd assume that your statement would work if you add the BINARY BASE64 option like this;
FOR XML AUTO, BINARY BASE64
I are troll
|
|
|
|
|
|
I want , the data are maintain two database for example database1 and
database2. Now must maintain same data in both database. If any changes in
database1 through another application , i want change database2 (or Notify, If
have any special query or any thing else please share with me ). I am using
Sql Server 2005 database , How can handle this
Please help me....
|
|
|
|
|
Google for 'sql server replication'
|
|
|
|
|
--> how to determine that a data (records of two columns) exist in a table?
for example:
CustomerID Customer Name City
1 John New York
2 Adam Detroit
3 Brayan Washington
--> i want to know if ("Adam" and "Detroit") exist in the same row or not....
J A Nasir K
modified on Sunday, April 12, 2009 11:45 AM
|
|
|
|
|
This is such a basic operation, that I can only suggest that you do some research on T-SQL. Particularly Select and Where . Try a few things out and come back if what you try fails.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
use the exists statement.
|
|
|
|
|
Hi
I am using SQL Server 2008.I want to write a stored proc to get values from three tables and each of these will have equal no of rows always.
so i want to merge the row at each level into a single row and insert into a new table (datatypes of source and destination columns are same)
For e.g.
Row1 from table1 and row1 from table2 and row1 from table3 into a single row1 in resulttable
Help would be appreciated
Thanks and regards
Abhi
|
|
|
|
|
You could paste the individual select -statements into a new table like this;
SELECT INTO resulttable (
SELECT TOP 1 [Field1] FROM [table1]
UNION
SELECT TOP 1 [Field1] FROM [table2]
UNION
SELECT TOP 1 [Field1] FROM [table3]
) Note that this will only work if the datatypes of source and destination columns are the same
--that forms a single table using the first row from each table, not a single row--
My bad for not reading the question properly. You'd want a result that's something like this;
SELECT [Table1Id], [Table2Id]
FROM [Table1],
[Table2] Linking the first row of table1 to the first row of table2, and so forth? Are the rows numbered in the database?
I are troll
modified on Sunday, April 12, 2009 6:31 AM
|
|
|
|
|
Hi,
I found a solution but i dont know if its the best performance wise.
Note :dbo.COM_FN_SplitString : it splits a string based on the delimiter passed
/*****Code*****/
Declare @table1 as table(rowID int IDENTITY(1,1),GroupId int)
Declare @table2 as table(rowID int IDENTITY(1,1),Cost Numeric(10,2))
Declare @table3 as table(rowID int IDENTITY(1,1),Currency Varchar(max))
Declare @resultTable as table(GroupId int,Cost Numeric(10,2),Currency Varchar(max))
Insert into @table1(GroupId) SELECT Convert(int,s) as GroupId From dbo.COM_FN_SplitString('1,2,3',',')
Insert into @table2(Cost) SELECT Convert(Numeric(10,2),s) From dbo.COM_FN_SplitString('30.0,35.5,40.0',',')
Insert into @table3(Currency) SELECT s From dbo.COM_FN_SplitString('Dollar,Pound,Dollar',',')
Insert into @resultTable(GroupId,Cost,Currency)
select GroupId,Cost,Currency From
@table1 as t1
inner join
@table2 as t2
on t1.rowID = t2.rowID
inner join
@table3 as t3
on t3.rowID = t1.rowID
select * From @resultTable
/*****Code*****/
|
|
|
|
|
Looks good - I think that it will perform quite nicely for four rows
I are troll
|
|
|
|
|
How can I show row values as column using sql query?
Thanking in advance
Johnny
|
|
|
|
|
it hasn't changed since yesterday.

|
|
|
|
|
Only b/c it is my article and I wasn't online yesterday. This may help[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks. Ur article did help a lot.
|
|
|
|
|
Is there any way to prevent my.mdb file to be open directly?
Actually i want to access it through programming only. Such as by changing the extension or any other way please suggest me.
thanks in advance
|
|
|
|
|
Pankaj Deharia wrote: Is there any way to prevent my.mdb file to be open directly?
Opened by what, or by whom?
Files can be made read-only or hidden, is that what you want?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Can't you just add a password to the database, use it in your app (through connection string) and not divulge it to the users?
if the connection string is stored somewhere outside the app, make sure to encrypt it, and have your app decrypt it.

|
|
|
|
|
How to use ObjectDataSource with example
|
|
|
|
|
look at the 3rd[^] result
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello
Can any 1 tell me how can I show column as row using query?
Thanking in Advance
Johnny
|
|
|
|
|
Google for SQL PIVOT

|
|
|
|
|
Hello!
I have following Microsoft Visual FoxPro expression:
Iif(a, b, ""), where
a = (IsNull(var1), "Z", var1 <> "A")
b = Iif(IsNull(myDate), Replicate("Z", 10), ConvertTimeToCharacter(myDate, 1))
I have divided this expression to "a" and "b" for better readability
I know that statement "a" should return Boolean value, but why "Z" is present there?
Please, could somebody explain me the meaning of statement "a".
I've looking through Internet without any results.
Thanks in advance!
modified on Friday, April 10, 2009 7:04 AM
|
|
|
|
|
Should statement 'a' be Iif((IsNull(var1), .F., var1 <> "A")) ?
As it stands it does not make sense, (IsNull(var1), "Z", var1 <> "A") is not a statement.
Regards
David R
|
|
|
|
|
hi
I have datarow which contains an int column
I want to increase the value by 1:
(int)row[0][0] += 1 // the first column is an int field
but when I do this I get an error: "The left-hand side of an assignment must be a variable, property or indexer"
is there a way to do this?
|
|
|
|