Hi all,
i had another problem about the thread. In my last question i asked if its possible to use a second select in the first one because what i was trying to find was the count of all rows that satisfies a specific criteria. I got it working to some point but now i realized the group by date...
Nevermind,
i got it. i was trying a select in count, having count in select solved the problem.
its like;
select col1,
(select count(*) where col2='abc') as abcrows
....
-shane
One more thing guys,
now i have a situation where i have to find the count of all rows which has a column like "abc".
i tried using count but how can i write a like statement in count?
it will be like:
select count (col1 like 'abc') as abcrows
i know the syntax is wrong.
any ideas?
thank...
in the stored procedure i ll create a temp table and set its columns from the select statement carlen stated, right? this is what i m asking. if i have a @tmp table with all coolumns declared, how can i set its rows from the select statement which calculates the sums and groups them.
thank you...
its not that i dont know anything about sql. but this is kinda new concept for me.
ok i have a temp table with all columns declared.
say the temp table has <month, c1,c2,c3,c4 >
how do i set the rows with what i get from:
select right(convert(char(11),getdate(),13),8)...
jbenson001,
this is what i m asking for. how can i create this stored procedure? basically it will take start date and end date as parameters and return me all the column totals grouped in months.
thanks,
-shane
no there is no id column, is it necessary in such scenerio?
actually this is not a table. its a view.
thanks for the answers, sorry for being a pain but can this be a stored procedure so i can create a datatable from it and bind it to my grid. if so how?
thank you
-shane
hi all,
i had a request about creating a grid type report which will show the result of several calculation of my db fields in .NET section and a good suggestion was to use sql for this. So sql will make all calculations and i ll show the results in a grid. The problem is i dont have much...
i dont feel myself confident with sql that much.
is there an example or tutorial that will guide me?
or can you please send a code sniplet
thank you
-shane
hi all
i have such scenerio: i have my data in db and i will be creating a report. the first column of the report will keep the number of some item, second column will be the number of another item etc.
so there is no tabular data, i have several calculations and the tricky part is i have to...
Hi all,
I have a case where i have to show some data along with some custom columns derived from other data.
Here is an example:
in my database i have 5 columns but i dont want to show them the way they are. I want to show 5 of them and use the rest 2 to create 2 custom columns.
the output...
hi,
i have html formatted text coming from my database and i want to show it as formatted in a textbox. assigning it to a label works fine but getting the db content in a textbox gets the html text, not the formatted text. Ex: <b> test </b> shows as it is and i want to show a bold "test" in...
Hi all,
i have a bunch of checkboxes (not checkbox list for some reason) and i collect all their data under a field. So if user selects cbA and cbC; A,C is sent to database.
Now i want to load my form so user can make some changes. Everthing works fine but i m doomed with the checkboxes. Here...
Hi,
i will be doing an update then an insert so i want to use the transaction to make sure if one fails the other wont do what its supposed to do. But there is a little problem, in my insert function i call the update function first. How can i run the same transaction while calling a function...
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.