Hi,
I am having my query result like below.
ID PID Pname Class
----------------------------
1 P1 Pname Class1
1 P1 Pname Class2
1 P1 Pname Class3
Now I want that three rows into one row like below
ID PID Pname Class1 Class2 Class3...
HI,
I Have two tables table1 and table2
Table1
--------
id Name
1 Test1
Table 2
--------
id Name
1 Test2
I need the result like below
Table1id Table2id Table1name Table2name
1 2 Test1 Test2
Can anybody help me in this.
Thanks
Kingston
HI,
In my application I am sending string to sqlserver for the columns to update.but the proceduare will substitute the value for the column.
for ex like below.
I am sending string with column name and the varibale to refer in sqlserver for value(@columnstoupdate) And I want the values to be...
I want to query a table like below.
The parameter @classval will have any class value
I want to do a T-sql for that.
Can anyb ody help me out what will be efficient way to do that.
Thought of doing some function with split but it performance is slow.
declare
@classval='Test1=2;Test3=1'
class...
HI,
if I pass fname then query should return only that condition,If null it should return all records.
declare
@fname as nvarchar(10)
set @fname=null
select * from emp where fname=@fname or @fname=null(Expected It will return all records but it returns 0 records)
I tried another approach...
folks,
In my following query I am using Table called vwrampositions which has millions of rows.
In my query after doing the join conditions and finally I am giving the where condition with date.so its doing all the join condition with millions of row and finally comes into where condition and...
hi,
i am gettung value as 14493.48000000000
I want to round to 2 decimals and take upto only 3 decimals.i need 14493.480
when i use round
select round(14493.48000000000,3)
i am getting 14493.48000000000.Can anybody help me how to
remove values other than 3 decimals.
I want 14493.480
Thanks...
HI,
I am loading the below xml in dom documnet
<x:PivotTable>
<x:OWCVersion>11.0.0.6555</x:OWCVersion>
<x:DisplayScreenTips />
<x:NoAutoFit />
<x:Height>376</x:Height>
<x:Width>1278</x:Width>
<x:CubeProvider>msolap.2</x:CubeProvider>
<x:CacheDetails />...
Folks,
In one of my requirement I have to use ADODB(since I need
old method recordset)in c#.I am trying to execute stored proc I don't know how to pass parameters from c# to adodb can anyone help me.
rs=cmd.execute(out object recordsaffected,ref object parameters,int options)
can somebody...
Folks,
I am working ion c# proj.In that I am using Microsoft office pivot table.For databing to pivot table I am planing to use older ADODB.(which makes easier).ANy body know the way where I can have a vb class in the same C# project which will return a string to my c#class.I am using .net 2.0
HI,
I have two resultset one result set is below
id pdate
1 2006-12-30
another temptable resultset
id pdate
1 null
I want to update the temptable pdate from the previous resultsset where the result is holded in CTE.
i.e update the temptable pdate with value 2006-12-30.
can somebody...
HI,
select
ROW_NUMBER()
OVER (PARTITION BY Secid
ORDER BY secid, PriceDate desc, price) AS 'RowNumber',* from
(
select secid, PriceSource, RefPriceSource, PriceDate, Price,
Dense_Rank() over (Partition by...
Hi,
I am using a pivot query like below.
IN this I am using @SelPorts variable.If I include this variable I am getting error Incorrect syntax.
Without variable If I directly put values like [EMBIDIV],[AR] I am getting result.
If I assign in variable and try to use it I am getting syntax error...
HI,
I am using simple query thats two views and one table are
referred in the table.In one view I am having multiple rows so I am using distinct.my query almost takes 8mts to complete.
Below is my query.Pl somebody help me to modify the query
for efficiency.I am using sql2005
SELECT...
I have a after Update trigger in one table which will
insert into audit table.
If i update one row in a table it works fine.When I
update multiple row,The trigger fails can anybidy help me in this.
I am using a update trigger in a table where after update
The trigger will insert the changed values in audit table
I am using like below in trigger.
select @valueold=symbol from Sec where id=(select id from deleted)
select @valuenew=symbol from Sec where id=(select id from inserted)
insert...
HI I am using the below query and getting the result.
select name,
Totalfor2006=isnull([2006],0),
Totalfor2005=isnull([2005],0)
from #temp
pivot
(
Sum(amt)
for [yr] in ([2006],[2005])
) as P
Name Totalfor2006 Totalfor2005
---------------------------------
x 100 200
Y 10 20
Now I...
attr
-----
a
c
d
null
null
select * from tablename where attr <> 'c'
I am selecting like above from table.
In my result set I am getting only a & d.
Null values are not showing.can anybody help me how to
get the null values also.
HI,
Can anybody help me to get cross tab query.
my table is like below.
id type remarks
4 FV TestFV
4 RC TEstRC
5 FV Test5FV.
I want the result as
id FVremarks RCremarks
4 TEstFV TestRC
5 Test5FV null.
pl some body help me in this query.
rgds
kingston
HI I am creating a web crystal report with back end sybase
connectivity is ase oledb provider.
when I use the reportdocument.refresh method I am getting queryengineerror.
Any body can help me out in this.
This Happens only in web report in windows app it's working fine.
Thx
kingston
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.