Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: kingstonr
  • Content: Threads
  • Order by date
  1. kingstonr

    select query with rows into columns.

    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...
  2. kingstonr

    Sql combining two tables.

    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
  3. kingstonr

    Help with sql string execution.

    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...
  4. kingstonr

    T-SQL Help

    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...
  5. kingstonr

    SImple query help

    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...
  6. kingstonr

    optimize query

    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...
  7. kingstonr

    simple rounding help.

    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...
  8. kingstonr

    XML update in c#

    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 />...
  9. kingstonr

    ADODB in c#

    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...
  10. kingstonr

    VB class in C#

    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
  11. kingstonr

    Update result set

    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...
  12. kingstonr

    Taking max value

    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...
  13. kingstonr

    Pivot qry Help.

    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...
  14. kingstonr

    Help to increase query performance.

    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...
  15. kingstonr

    Multi row update Trigger.

    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.
  16. kingstonr

    Trigger qns for multiple Update.

    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...
  17. kingstonr

    Column Total using Pivot

    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...
  18. kingstonr

    Simple select statement

    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.
  19. kingstonr

    Cross tab sql in sqlserver.

    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
  20. kingstonr

    asp.net crystal report

    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

Part and Inventory Search

Back
Top