Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL Query help

$
0
0

I have a view that runs fine, but I need to make a change to it. When I edit the view for some reason its either missing or adding something and I can't figure it out. Item table contains the same web parent number with different item numbers, so the query is making a new view with the web parent and the first record it finds for that parent.

SELECT [Web Parent], [No_], [Description], [Unit Price], [Gross Weight], [Web Memo], [Web Part Number], [Length], [Width], [Height], [Web Site Code], [esellable], ROW_NUMBER() OVER (PARTITION BY [Web Parent] ORDER BY [Unit Price] ASC) AS ROW FROM dbo.database$Item WHERE esellable = 1 AND ([Web Site Code] = 1 OR [Web Site Code] = 3)) SELECT * FROM groups WHERE groups.ROW = 1

If I edit and just save it, I get a message incorrect syntax near ')' - I tried to remove one of the quotes from =3))...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>