Showing posts with label along. Show all posts
Showing posts with label along. Show all posts

Thursday, March 8, 2012

can i use sqlserver2005 with asp.net 1.1 ?

hie

can i use sql server 2005 along with asp.net 1.1 as my front end ?

any idea of doing this ?

Of course.

Sunday, February 19, 2012

Can I ship database developed in SQL Server 2005 to customer ?

Hi,
I want to ask a question whether I can ship the database created in SQL
Server 2005 to customer along with installation for free of cost or not
(just like mySQL) ? Will I have to pay something to anybody for this ?
Please let me know as this will drive my decision of database engine
selection in .NET application.
Regards,
Jigar MehtaHi,
sure you can use the SQL Server Express edition to distribute that to
your customer. it free for distribution. There are some extra features
/ gimmics if you register at the microsoft site (Didn=B4t tried that
yet), but in common yes you can use SQL Server Express.
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--|||Database created in SQL Server != Sql Server. Of course you can distribute
your database (stored in *.mdf and *.ldf file usually), but not the SQL
Server (unless it is SQL Server2005 Express or MSDE). The users of your app
must have SQL Server/Express/MSDE (latter tow are free) available somewhere
on their computer/network to host your DATABASE.
All in all, your database is yours, you can distribute it at your will. Your
user can get free edition of SQL Server Express (or distributed by your app)
or buy commercial edition (when the app's functionality requires that
power).
"Jigar" <jigar.programmer@.gmail.com> wrote in message
news:1150577676.753804.214600@.g10g2000cwb.googlegroups.com...
> Hi,
> I want to ask a question whether I can ship the database created in SQL
> Server 2005 to customer along with installation for free of cost or not
> (just like mySQL) ? Will I have to pay something to anybody for this ?
> Please let me know as this will drive my decision of database engine
> selection in .NET application.
> Regards,
> Jigar Mehta
>

Tuesday, February 14, 2012

Can I put a common table inside a common table?

I have query A that uses 2 common tables, and I would like to put query A into query B as a common table along with the other common tables already in query B. So basically I would be creating another common table in query B that consists of query A in its entirety. Can this be done and if so, what's the correct syntax?

Query A (keep in mind i just use generic coding to simpifly the idea)

Code Snippet

WITH ct1 AS

(

SELECT Field1, Field2, Field3

FROM TableA

WHERE Field1 > 5

),

ct2 AS

(

SELECT Field1, Field4, Field5

FROM TableB

WHERE Field4 = ‘1/1/2007’

)

SELECT ct1.Field1, ct1Field2, ct2.Field4

FROM ct1 INNER JOIN ct2 ON ct1.Field1 = ct2.Field1

WHERE ct.2 Field5 = 9

How do I put this query inside another query as a common table since there’s already existing common tables?

I’ve tried this, basically just enclosing it inside the common table syntax, but it just errors out.

Code Snippet

WITH querybce AS

(

WITH ct1 AS

(

SELECT Field1, Field2, Field3

FROM TableA

WHERE Field1 > 5

),

ct2 AS

(

SELECT Field1, Field4, Field5

FROM TableB

WHERE Field4 = ‘1/1/2007'

)

SELECT ct1.Field1, ct1Field2, ct2.Field4

FROM ct1 INNER JOIN ct2 ON ct1.Field1 = ct2.Field1

WHERE ct.2 Field5 = 9

)

I've attempted the idean of joining the two queries into one, but it won't work that way. Any ideas would be greatly appreciated in achieving it this way, if it's even possible! Thanks!

No, you can not have nested CTEs.

Look for "WITH common_table_expression (Transact-SQL)" in BOL.

AMB

|||

I don't know what you are trying to do exactly. But you could do:

Code Snippet

WITH ct1 AS

(

SELECT Field1, Field2, Field3

FROM TableA

WHERE Field1 > 5

),

ct2 AS

(

SELECT Field1, Field4, Field5

FROM TableB

WHERE Field4 = '1/1/2007'

)

,

querybce AS

(

SELECT ct1.Field1, ct1Field2, ct2.Field4

FROM ct1 INNER JOIN ct2 ON ct1.Field1 = ct2.Field1

WHERE ct.2 Field5 = 9

)

select.... from querybce...